JavaScript DOM HTML method: item()
[this page | pdf]
The item() method (when applied to HTML elements
in the JavaScript
DOM) returns
the node at the specified index position in a NodeList.
It
has the following syntax with the following parameters. It returns a node
object representing the node at the relevant index value, or null if the index is outside the
applicable range.
nodelist.item(index) or nodelist[index]
Parameter
|
Required / Optional
|
Description
|
index
|
Required
|
Number representing the
index of node to be returned (the index is zero-based, i.e. starts at zero)
|
NAVIGATION LINKS
Contents | Prev | Next | JavaScript DOM (and BOM)