1.

What is the purpose of the method nodeMap.setNamedItem()?(a) Sets ID(b) Sets attribute node(c) Sets element name(d) Sets element typeI got this question during a job interview.This is a very interesting question from HTML DOM in division Caching, Debugging and Animation of JavaScript

Answer»

Correct choice is (B) Sets ATTRIBUTE node

Explanation: The setNamedItem() method adds the SPECIFIED node to the NamedNodeMap. The method nodeMap.setNamedItem() sets the specified attribute node (by name).



Discussion

No Comment Found

Related InterviewSolutions