91Chapter 8Window and Document Objectsdocument.forms[] propertyIt is convenient (Geocities web hosting)
91Chapter 8Window and Document Objectsdocument.forms[] propertyIt is convenient that the document object contains a property document.forms whosevalue is an array of all form element objects in the document. As you recall from thediscussion of arrays in Chapter 7, an index number inside an array s square brackets pointsto one of the elements in the array. To find out how many formobjects are in the currentdocument, usedocument.forms.lengthTo access the first form in a document, for example, the reference isdocument.forms[0] As a further convenience, all scriptable browsers let you reference a form more directly byitsname (that is, the identifier assigned to the nameattribute of the