# NodeList : Array
Return to: HTML DOM Level 2 index

Collection of nodes accessible by index.

## Platform Support

IE | Mozilla | Netscape | Opera | Safari
--- | --- | --- | --- | ---
no | 1.0+ | 7.0+ | no | no

## Constructors

Constructor | Action | IE | Mozilla | Netscape | Opera | Safari
--- | --- | --- | --- | --- | --- | ---
NodeList Constructor() : NodeList Collection of nodes accessible by index. | Show Details | no | 1.0+ | 7.0+ | no | no

### NodeList() : NodeList

Collection of nodes accessible by index.

Returns

NodeList |

Visibility
  internal

## Properties

Property | Action | IE | Mozilla | Netscape | Opera | Safari
--- | --- | --- | --- | --- | --- | ---
length : Number The number of nodes in this list. | Show Details | no | 1.0+ | 7.0+ | no | no

Remarks
  Number of nodes contained within this `NodeList`. If no nodes are in this list, returns 0.
Availability

  HTML DOM Level 1|HTML DOM Level 2|W3C

## Functions

Method | Action | IE | Mozilla | Netscape | Opera | Safari
--- | --- | --- | --- | --- | --- | ---
static item(Number index) : Node Returns the node contained at the specified index. | Show Details | no | 1.0+ | 7.0+ | no | no

Parameters

Number | index | Index number to retrieve.

Returns

Node |

  ### Using item

      for (var idx = 0; idx < node.Node.childNodes.length; idx++) {
                              var curNode = node.Node.childNodes.item(idx);
                              }

  For more examples, see the quirksmode test page:

  http://www.quirksmode.org/dom/tests/item.html

Remarks
  Returns the node contained within this NodeList at the given index number. The index values start counting at 0, and a `null` value will be returned if an invalid index is supplied.
Availability

  HTML DOM Level 1|HTML DOM Level 2|W3C

## Remarks

A `NodeList` is a sort of array which is used to contain a collection of nodes. It is commonly used throughout the DOM objects as a way of returning a list of nodes, whether as a listing of <property>Node.attributes</property> bound to an `Element`, or as a list of <property>Node.childNodes</property>.

Though in principle this object is similar to an `Array`, it is merely a very rudimentary form, and as such there is no relationship between the two objects. The list of methods and properties a `NodeList` supports is quite small in comparison.

## References

NamedNodeMap

## Availability

HTML DOM Level 1|HTML DOM Level 2|W3C

text_javascript aptana_docs