JavaScript Wiki
Line of inheritance:
ObjectHTMLCollection
This article is a stub. You can help the JavaScript Wiki by expanding it.

Template:Mainonly

An HTMLCollection is an array-like object which lists HTML elements according to their name and id attributes and their order of occurrence in the document.

Properties[]

length[]

Data type number
Standard DOM Level 1 HTML, DOM Level 2 HTML
Documentation none

Methods[]

item[]

Data type function
Return type Node
Parameter list index (number)
Standard DOM Level 1 HTML, DOM Level 2 HTML
Documentation Microsoft (IE8)

namedItem[]

Data type function
Return type Node
Parameter list name (string)
Standard DOM Level 1 HTML, DOM Level 2 HTML
Documentation Microsoft (IE8)

See also[]

  • NodeList, a similar DOM type