<form name="myForm" action="http://www.PuStudy.Com/resources/html-forms-action.html"> <input type="text"> <input type="reset"> </form>
The above example demonstrates usage of the
<input> element with the
type attribute set to
reset value represents a reset button. When the user clicks it, its associated form is reset (all "resettable" form fields will reset to their original value).
You can use the
value attribute to provide a label for the reset button. If you don't provide this attribute, the button will typically display the text Reset or similar.
Be careful when using reset buttons. Only use them if it's absolutely necessary. And if you do use them, try to position and style them in a way that prevents accidental clicks. For example, don't place it in a position or style it in a way that the user might confuse it for a "Submit" button. Imagine filling out a large form, only to accidentally click the "Reset" button instead of "Submit". All your hard work will be instantly wiped, and you'll have to start again.