Collection.namedItem() (Method)

Select an Element object by name or ID value.

Availability:

DOM level - 1
JavaScript - 1.5
JScript - 5.0
Internet Explorer - 5.0
Netscape - 6.0
Opera - 5.0
Property/method value type:Node object
JavaScript syntax:-myCollection.namedItem(aString)
-myCollection[aString]
Argument list:aStringA textual value that selects all matching objects

This is a search method that traverses a collection looking for a named item or collection of items.

The argument is a string containing the name or ID value of the Element to be located.