namedItem method

Element? namedItem(
  1. String name
)

The namedItem() method of the HTMLCollection interface returns the first Element in the collection whose id or name attribute match the specified name, or null if no element matches.

In JavaScript, using the array bracket syntax with a String, like collection["value"] is equivalent to collection.namedItem("value").

Implementation

external Element? namedItem(String name);