Skip to main content

HTMLFormControlsCollection

The HTMLFormControlsCollection interface represents a collection of HTML form control elements, returned by the HTMLFormElement interface's elements property.

MDN Reference

Extends​

Indexable​

[index: number]: Element

Methods​

[iterator]()​

iterator: ArrayIterator<Element>;

Returns​

ArrayIterator<Element>

Inherited from​

HTMLCollectionBase.[iterator]


item()​

item(index): Element | null;

The HTMLCollection method item() returns the element located at the specified offset into the collection.

MDN Reference

Parameters​

ParameterType
indexnumber

Returns​

Element | null

Inherited from​

HTMLCollectionBase.item


namedItem()​

namedItem(name): Element | RadioNodeList | null;

The HTMLFormControlsCollection.namedItem() method returns the RadioNodeList or the Element in the collection whose name or id match the specified name, or null if no node matches.

MDN Reference

Parameters​

ParameterType
namestring

Returns​

Element | RadioNodeList | null

Properties​

length​

readonly length: number;

The HTMLCollection.length property returns the number of items in a HTMLCollection.

MDN Reference

Inherited from​

HTMLCollectionBase.length