August 1999
Intermediate to advanced
1488 pages
72h 53m
English
form.elements.length
The elements.length property of the Form object specifies the number of items in the elements array. Each item in the array refers to an object in the HTML form.
Listing 7.257 shows how to use the elements.length property. When the user clicks the Get Elements button, an alert box is displayed indicating the number of elements in the form.
<html> <head> <title> Using the elements.length property of the Form object</title> </head> <body> <script language="JavaScript"> <!-- Hide // function uses the elements.length property to get the number of elements in the form. ... |
Read now
Unlock full access