ExamVeda
Login
Home
11
How many node types are there in total?
Discuss
Answer & Solution
Answer: Option B
Solution:
There are total of 12 node types.
12
What is the purpose of the Node object property ownerDocument?
Discuss
Answer & Solution
Answer: Option A
Solution:
The node object property ownerDocument returns the root element (document object) for a node.
13
Which of the following Node object property returns the local part of the name of a node?
Discuss
Answer & Solution
Answer: Option B
Solution:
The Node object property localName Returns the local part of the name of a node
14
What is the property textContent?
Discuss
Answer & Solution
Answer: Option C
Solution:
The property textContent sets or returns the textual content of a node and its descendants.
15
How many Node object methods are available?
Discuss
Answer & Solution
Answer: Option A
Solution:
There are totally 18 node object methods.
16
Which of the following Node object property returns the node immediately before a node?
Discuss
Answer & Solution
Answer: Option A
Solution:
The node object property previousSibling returns the node immediately before a node.
17
What is the purpose of the method getUserData(key)?
Discuss
Answer & Solution
Answer: Option A
Solution:
The method getUserData(key) returns the object associated to a key on a this node. The object must first have been set to this node by calling setUserData with the same key.
18
How to test if two nodes are equal?
Discuss
Answer & Solution
Answer: Option A
Solution:
The method isEqualNode() is used to test if two nodes are equal.
19
How to associate an object to a key on a node?
Discuss
Answer & Solution
Answer: Option C
Solution:
The method setUserData(key,data,handler) is used to associate an object to a key on a node.
20
Which method is used to compare the placement of two nodes in the DOM hierarchy (document)?
Discuss
Answer & Solution
Answer: Option A
Solution:
The compareDocumentPosition() method is used to compare the placement of two nodes in the DOM hierarchy (document).