Working with Reset Buttons
Clicking a reset button (Figure 68.10) causes the browser to return all fields in the form to their default values. If a field doesn't have a default value, the browser clears the field instead.
Figure 68.10. Add a reset button to allow your visitor to return the form to its default state.
[View full size image]
TIPYou can add as many reset buttons as you like, but you really only need one per form. The best place for the button is usually at the bottom of the form, to the right of the submit button. |
Listing 68.10. View Source for Figure 68.10.
The reset button's value attribute determines the text that appears on the button's face.
<form>
<input type="reset" name="fieldsReset" value="Reset Fields">
</form>
|