length property (form, keygen, select)
Returns the number of form controls in a form element or the number of options in a select or keygen element.
For the list of form controls, see the page for the form element.
You can find the related objects in the Supported by objects section below.
This property is read-only.
Integer that represents the number of objects.
Default: this property has no default value.
Example HTML code 1:
This example illustrates the use of the length property:
Did you find this example helpful?
User Contributed Comments