HTML DOM Document getElementsByName()
HTML DOM Document getElementsByName() Method
The getElementsByName() method is used to return collection of elements with specific name. It returns is NodeList. The nodes in the list can be accessed by index and start at 0.
Its length Property returns the number of nodes in the list.
Syntax:-
Its syntax is:- document.getElementsByName(name)
Return:-
Its return is:- a collection of elements with the specific name
Further Explanation:-
Parameter | Description |
name | Required. Value of element name attribute. |