web api instance method
HTMLAllCollection: namedItem() method
The namedItem() method of the HTMLAllCollection interface returns the first Element in the collection whose id or name attribute matches the specified name, or null if no element matches.
Syntax
namedItem(name)
Parameters
name- : A string representing the value of the
idornameattribute of the element we are looking for.
- : A string representing the value of the
Return value
The first Element in the HTMLAllCollection matching the name, or null, if there are none.
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.