Definition and Usage
The getElementsByName() method accesses all elements with the specified name.
Syntax
document.getElementsByName(name) |
Parameter | Description |
---|---|
name | Required. The name of the element you want to access/manipulate |
Browser Support
The getElementsByName() method is supported in all major browsers.
Example
ExampleAlert the number of elements with a specific name:
Try it yourself » |