Reset and Submit Buttons

The controls for reset and submit functions are built right into HTML, so you don't have to do much to get these working and even customized to a certain degree without ever touching images or style.

The reset button clears the form when it is clicked. The submit button submits the data in the form, which uses the information in the method and action attributes in the form element itself to send the data to the server for processing.

Example 5-11 shows how to create reset and submit buttons.

Example 5-11. Creating reset and submit buttons

<form method="get" action="http://www.myserver.com/cgi-bin/mailscript/"><input type="reset" value="reset" /><input type="submit" value="submit" /></form>

Figure 5-12 shows how ...

Get Spring Into HTML and CSS 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.