Below is a form consisting of 3 text boxes.

<FORM NAME="id"> <INPUT TYPE="text" NAME="First" SIZE="15" VALUE="Sammy"> <INPUT TYPE="text" NAME="Last" SIZE="15" VALUE="Salamander"> <INPUT TYPE="text" NAME="Age" SIZE="3" VALUE="17"> </FORM> The document identifier can be used to access information stored in the text boxes. This information can then be displayed in the document window. Notice that document.id.First.value is the Javascript expression that represents the data in the box named First. If you use the document.write() function, the information can be displayed in the browser.

Below is the Javascript used to create the display shown at the bottom of this web page.

<SCRIPT LANGUAGE="Javascript"> document.write("FIELD NAME: ", document.id.First.name); document.write("&nbsp;&nbsp;FIELD VALUE: ", document.id.First.value); document.write("<BR>FIELD NAME: ", document.id.Last.name); document.write("&nbsp;&nbsp;FIELD VALUE: ", document.id.Last.value); document.write("<BR>FIELD NAME: ", document.id.Age.name); document.write("&nbsp;&nbsp;FIELD VALUE: ", document.id.Age.value); </SCRIPT>