1.

How to get a particular value using the tagged name?(a) getElementbyID()(b) getElementsbyName()(c) getElementsbyTagName()(d) getTagName()I have been asked this question in an internship interview.The question is from Script Loading topic in chapter Invocation and Performance Navigation of JavaScript

Answer»

Correct option is (c) getElementsbyTagName()

For explanation I would say: The getElementsByTagName() method returns a COLLECTION of all ELEMENTS in the document with the specified tag name, as a NodeList object. The method getElementsbyTagName() can be used to get a PARTICULAR value USING the tagged name associated with the document.



Discussion

No Comment Found

Related InterviewSolutions