This property yields the number of forms in the document. Each form is represented by its own individual Form object.
The length property is consistent across Netscape and MSIE in that it reports the number of unique Form objects that are available. However, this is not the length of the array in Netscape because additional elements are placed into the array to access the Form objects associatively by name.
The length value is only correct in Netscape if you are accessing the array with numeric index values. You will get more than myFormArray.length objects if you enumerate the array with a for( ... in ... ) loop. In that case you will visit each Form object more than once.
See also: | Collection.length |
Prev | Home | Next |
FormArray.item() | Up | FormElement object |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |