Document.forms[] (Collection)

An array containing a list of all the forms in the document.

Availability:

DOM level - 1
JavaScript - 1.0
JScript - 3.0
Internet Explorer - 4.0
Netscape - 2.0
Opera - 3.0
Property/method value type:FormArray object
JavaScript syntax:-myDocument.forms
HTML syntax:<FORM>

Every <FORM> element in the document corresponds to an object in the forms[] array.

Warnings:

Example code:

   // Referring to the first form of a document

   myFirstForm = document.forms[0];

   // Referring to the last form of a document

   myLastForm = document.forms[document.forms.length-1];

See also:Document object, Element.all[], Form object, FormArray object

Property attributes:

ReadOnly.