Home / CSE / Javascript - CS :: Server Side and Client Side Scripting

CSE :: Javascript - CS

  1. What is the property to access the first child of a node?

  2. A.

     timestamp.Child1

    B.

     timestamp.Child(1)

    C.

     timestamp.Child(0)

    D.

     timestamp.firstChild

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. What are the properties supporting CSS styles for a document element?

  4. A.

     style and font

    B.

     style and className

    C.

     size and style

    D.

     className and font

    View Answer

    Workspace

    Discuss Discuss in Forum


  5. The style property belongs to while of the following object?

  6. A.

     Element

    B.

     Window

    C.

     Location

    D.

     None of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  7. What is the purpose of the event handlers in the JavaScript?

  8. A.

     Adds innerHTML page to the code

    B.

     Performs handling of exceptions and occurences

    C.

     Allows JavaScript code to alter the behaviour of windows

    D.

     None of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  9. Which handler is triggered when the content of the document in the window is stable and ready for manipulation?

  10. A.

     onload

    B.

     manipulate

    C.

     create

    D.

     none of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  11. When a program contains extensive use of event handlers, which of the following is necessary?

  12. A.

     Modular functions

    B.

     Nested functions

    C.

     Split up programs

    D.

     All of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  13. What is the code snippet to find all container elements with class “reveal”?

  14. A.

     var elements = document.getElementsByClassName("reveal");

    B.

     var elements = document.getElementByClassName("reveal");

    C.

     var elements = document.getElementByName("reveal");

    D.

     var elements = document.getElementsClassName("reveal");

    View Answer

    Workspace

    Discuss Discuss in Forum


  15. What is the code snippet to update the content of the timestamp element when the user clicks on it?

  16. A.

     timestamp.onLoad = function() { this.innerHTML = new Date().toString(); }

    B.

     timestamp.onclick = function() { this.innerHTML = new Date().toString(); }

    C.

     timestamp.onload = function() { this.innerHTML = new Date().toString(); }

    D.

     timestamp.onclick = function() { innerHTML = new Date().toString(); }

    View Answer

    Workspace

    Discuss Discuss in Forum


  17. Which of the following is not an object?

  18. A.

     Element

    B.

     Location

    C.

     Position

    D.

     Window

    View Answer

    Workspace

    Discuss Discuss in Forum


  19. What is the code snippet to change the class and let the stylesheet specify the details?

  20. A.

     timestamp.className = "highlight";

    B.

     timestamp.className = "change";

    C.

     timestamp.className = "specify";

    D.

     timestamp.className = "move";

    View Answer

    Workspace

    Discuss Discuss in Forum