Computer Science, asked by mirkamruzaman9379, 1 year ago

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 jayshreetomar67
0
ANSWER.--( B ) getElementsByName()
Answered by anjaliom1122
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