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


  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


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

  6. A.

     Element

    B.

     Window

    C.

     Location

    D.

     None of the mentioned


  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


  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


  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


  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");


  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(); }


  17. Which of the following is not an object?

  18. A.

     Element

    B.

     Location

    C.

     Position

    D.

     Window


  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";