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()
Answers
Answered by
0
ANSWER.--( B ) getElementsByName()
Answered by
0
Answer:
Correct Option B.
B getElementsByName()
getElementsByName() can be used to select HTML elements based on the value of their name attributes.
Explanation:
The getElementsByName() method of the Document object can be used to select HTML elements based on the value of their name attributes.
var radiobuttons = document; var radiobuttons = document; var radiobuttons = document.
The getElementsByName() method returns a NodeList object containing all elements in the document with the specified name (the name attribute value).
Usage:
- The getElementsByName() method returns a list of elements that have the same name as the parameter.
- A live NodeList is returned by the getElementsByName() method.
The getElementsByName() method returns a list of elements that have the same name as the parameter. A live NodeList is returned by the getElementsByName() method.
Similar questions
Math,
7 months ago
Biology,
7 months ago
Computer Science,
1 year ago
Computer Science,
1 year ago
English,
1 year ago
Chemistry,
1 year ago