August 1999
Intermediate to advanced
1488 pages
72h 53m
English
form.elements
The elements property of the Form object represents the elements array, which is used to access each element within a form. The order of the form elements in the elements array is the order in which they appear in the HTML source.
Listing 7.256 shows how to access form elements using the elements array. Because it is accessing the first element in the form, the index 0 is used. The second element in the form can be accessed with elements[1].
<html> <head> <title> Using the form elements property</title> </head> <body> <script language="JavaScript"> <!-- Hide function getName(){ var textName ... |
Read now
Unlock full access