JavaScripture
Contribute via GitHub Feedback

JavaScript HTMLCollection : Object

A list of Elements similar to an NodeList. The Element.children property returns an HTMLCollection.

Instance Indexers

this[index : Number] : Element  

Returns the item at index in the collection.

Example:

Run

Results:

 

Instance Properties

length : Number  

The number of Elements in the list.

Example:

Run

Results:

 

Instance Methods

item(index : Number) : Element
namedItem(idOrName : String) : Element

Returns the Element in the this that has id or name equal to idOrName.

Example:

Run

Results: