DekGenius.com
Team LiB   Previous Section   Next Section
NodeList.item( ) get an element of a NodeList

Availability

DOM Level 1 Core

Synopsis

Node item(unsigned long index);

Arguments

index

The position (or index) of the desired node in the NodeList. The index of the first node in the NodeList is 0, and the index of the last Node is length-1.

Returns

The node at the specified position in the NodeList, or null if index is less than zero or greater than or equal to the length of the NodeList.

Description

This method returns the specified element of a NodeList. In JavaScript, you can use the square-bracket array notation instead of calling item( ).

    Team LiB   Previous Section   Next Section