{{ APIRef("HTMLFormControlsCollection", "HTMLCollection") }}
The HTMLFormControlsCollection
interface represents a collection of HTML form control elements. It provides one additional method besides the properties and methods inherited from {{domxref("HTMLCollection")}}.
This interface is used by the {{domxref("HTMLFormElement")}} interface's elements
property, and the {{domxref("HTMLFieldSetElement")}} interface's elements
property.
Properties
This interface inherits the properties of its parent, {{domxref("HTMLCollection")}}.
Methods
This interface inherits the methos of its parent, {{domxref("HTMLCollection")}}.
- {{domxref("HTMLFormControlsCollection.namedItem()")}}
-
Returns the {{domxref("RadioNodeList")}} or the {{domxref("Element")}} in the collection whose
name
orid
match the specified name, ornull
if no nodes match. Note that this version ofnamedItem()
hide the one inherited from {{domxref("HTMLCollection")}}. Like that one, in Javascript, using the array bracket syntax with a {{jsxref("String")}}, likecollection["value"]
is equivalent tocollection.namedItem("value")
.
Specifications
Specification | Status | Comment |
---|---|---|
{{SpecName('HTML WHATWG', "infrastructure.html#htmlformcontrolscollection", "HTMLFormControlsCollection")}} | {{Spec2('HTML WHATWG')}} | No change since the last snapshot, {{SpecName('HTML5 W3C')}}. |
{{SpecName('HTML5 W3C', "infrastructure.html#htmlformcontrolscollection", "HTMLFormControlsCollection")}} | {{Spec2('HTML5 W3C')}} | In this snapshot of {{SpecName("HTML WHATWG")}}, the HTMLFormControlsCollections is defined for the first time. |
Browser compatibility
{{CompatibilityTable}}
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | {{CompatVersionUnknown}} | {{CompatGeckoDesktop(27)}} [1] | {{CompatNo}} | {{CompatVersionUnknown}} | {{CompatUnknown}} |
Feature | Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | {{CompatVersionUnknown}} | {{CompatGeckoMobile(27)}} [1] | {{CompatNo}} | {{CompatVersionUnknown}} | {{CompatUnknown}} |
[1] Until Firefox 32 included, the eventual {{domxref("RadioNodeList")}} returned by namedItem
was a {{domxref("NodeList")}}.
See also
- {{domxref("HTMLCollection")}}, {{domxref("RadioNodeList")}}, {{domxref("HTMLOptionsCollection")}}