HomeMenu
Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

namedItem

Description

The namedItem of HTMLOptionsCollection for JS returns the item with ID or name name from collection.

If there are multiple matching items, then the first is returned.

Syntax

element = collection.namedItem(name)
element = collection[name]

Parameters

name

A non-empty string.

Examples

1 · namedItem · single

2 · namedItem · multiple

3 · [ ] · single

4 · [ ] · multiple