elements property
HTMLFormControlsCollection
get
elements
The HTMLFormElement property
elements
returns an
HTMLFormControlsCollection listing all the form controls contained in
the form
element.
Independently, you can obtain just the number of form controls using the HTMLFormElement.length property.
You can access a particular form control in the returned collection by
using either an
index or the element's name
or id
attributes.
Prior to HTML 5, the returned object was an HTMLCollection, on which
HTMLFormControlsCollection
is based.
Note: Similarly, you can get a list of all of the forms contained within a given document using the document's Document.forms property.
Implementation
external HTMLFormControlsCollection get elements;