elements | NN 2 IE 3 DOM 1 |
A collection of all elements contained within a form. Collection members are sorted in source code order. Because each form element includes a type property (starting with Navigator 3 and Internet Explorer 4), scripts can loop through all elements in search of elements of a specific type (e.g., all checkbox elements). |
|
Object Model Reference | |
document.forms[i].elements
document.formName.elements
|
|
Object-Specific Properties | |
length |
|
Object-Specific Methods | |
None. |
|
Object-Specific Event Handler Properties | |
None. |
length | NN 2 IE 3 DOM 1 |
Read-only | |
Returns the number of elements in the collection. |
|
Example | |
var howMany = document.forms[0].elements.length; |
|
Value | |
Integer. |