User Tools

Site Tools


javascript

This is an old revision of the document!


Get Element

getElementsByName()

The getElementsByName() method returns an array of all elements with the specified name.

document.getElementsByName(name)
Parameter Description
name The name of the elements to get.
var arr = document.getElementsByName("name");
alert(arr.length); // the number of elements returned
javascript.1366763327.txt.gz · Last modified: 2023/08/18 18:15 (external edit)