Forms
Accessing information on a form.

Previously we have talked about how to access information (element properties) on a form. Below is a form with a text box, a check box, two radio buttons, and a button.

<form name="myForm" method="post">
<input type="Text" name="myText" value=""></input>
<input type="Checkbox" name="myCheck" value="a check"></input>
<input type="Radio" name="myRadio" value="r1"></input>
<input type="Radio" name="myRadio" value="r2"></input>
<input type="Button" name="myButton" value="click me"></input>
<input type="Reset" value="refresh"></input>
<input type="Hidden" name="myHidden" value="stuff"></input>
</form>




  

To gather information on the form:

Now that we know how to access properties on a form, let's try using this concept to validate whether a user has entered data on a form:
Click here to see the example