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.

TIP

You 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.
 <form> <input type="reset" name="fieldsReset" value="Reset Fields"> </form> ...

Get Web Design Garage now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.