November 16, 1999 - Referencing Forms
November 16, 1999|
Tips: November 1999
Yehuda Shiran, Ph.D.
Take a look at the following document:
<HTML> <HEAD><TITLE>Forms</TITLE></HEAD> <BODY> <FORM NAME="firstForm"></FORM> <FORM></FORM> <FORM NAME="thirdForm"> <INPUT TYPE="text" NAME="myField" SIZE="30"> </FORM> </BODY> </HTML>
The value of the text field in the third form can be retrieved in one of the following fashions:
Notice that the
forms array (a property of the
document object) is zero-based. In other words, 0 reflects the first form, 1 reflects the second form, and so forth.
Note that the
document.forms object can also be used with the name of the desired form (like a Visual Basic collection):