Reset Button
Reset Button
DescriptionThe tag to add a reset button is <INPUT TYPE="reset">. This will reset all the fields that are in the same form as the reset button.
Code
<FORM METHOD="POST" ACTION="script.cgi">

<INPUT TYPE="text"> <BR>
<INPUT TYPE="text"> <BR>
<INPUT TYPE="reset">

</FORM>
Output


Practice
Change Button Text
DescriptionWithout specifying anything, the reset button has a default value of "reset". However, you are able to change this by adding the line VALUE="X" to the tag <INPUT TYPE="reset"> so the final result is <INPUT TYPE="reset" VALUE="X">. X is replaced with the initial value. The initial value is what will be displayed in the button.
Code
<FORM METHOD="POST" ACTION="script.cgi">

<INPUT TYPE="text"> <BR>
<INPUT TYPE="text"> <BR>
<INPUT TYPE="reset" VALUE="Clear">

</FORM>
Output


Practice
Advertisements