Home / CSE / Javascript - CS :: Document Object Model and Event Handling

CSE :: Javascript - CS

  1. How many node types are there in total?

  2. A.

     11

    B.

     12

    C.

     13

    D.

     14

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. What is the purpose of the Node object property ownerDocument?

  4. A.

     Returns the root element

    B.

     Returns the last element

    C.

     Returns the parent node

    D.

     Returns the immediate node

    View Answer

    Workspace

    Discuss Discuss in Forum


  5. Which of the following Node object property returns the local part of the name of a node?

  6. A.

     lastName

    B.

     localName

    C.

     firstName

    D.

     none of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  7. What is the property textContent?

  8. A.

     Sets the textual content of a node

    B.

     Returns the textual content of a node

    C.

     Sets & Returns the textual content of a node

    D.

     None of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  9. How many Node object methods are available?

  10. A.

     18

    B.

     19

    C.

     20

    D.

     21

    View Answer

    Workspace

    Discuss Discuss in Forum


  11. Which of the following Node object property returns the node immediately before a node?

  12. A.

     previousSibling

    B.

     textContent

    C.

     index

    D.

     localName

    View Answer

    Workspace

    Discuss Discuss in Forum


  13. What is the purpose of the method getUserData(key)?

  14. A.

     Returns the associated object

    B.

     Gets the user data

    C.

     Returns the user data

    D.

     None of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  15. How to test if two nodes are equal?

  16. A.

     isEqualNode()

    B.

     equal()

    C.

     ==

    D.

     none of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  17. How to associate an object to a key on a node?

  18. A.

     getUserData()

    B.

     cloneNode()

    C.

     setUserData(key,data,handler)

    D.

     none of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  19. Which method is used to compare the placement of two nodes in the DOM hierarchy (document)?

  20. A.

     compareDocumentPosition()

    B.

     cloneNode()

    C.

     getUserData()

    D.

     getFeature()

    View Answer

    Workspace

    Discuss Discuss in Forum