1.

Which of the following can be used to select HTML elements based on the value of their name attributes?(a) getElementByName()(b) getElementsByName()(c) getElementsName()(d) getElementName()

Answer» The correct choice is (b) getElementsByName()

For explanation: The getElementsByName() method returns a collection of all elements in the document with the specified name (the value of the name attribute), as a NodeList object.


Discussion

No Comment Found

Related InterviewSolutions