How.com.vn is a “wiki,” similar to Wikipedia, which means that many of our articles are co-written by multiple authors. To create this article, volunteer authors worked to edit and improve it over time.
This article has been viewed 96,531 times.
Learn more...
Want to give your visitor the ability to clear all form data they entered? This article will give you the code to input the button they'll need to clear their data.
Things You Should Know
- Before you can create a reset button, you need to create an HTML form using the <form> tag.
- Use the <input type="reset"> tag to create a reset button.
- Place your reset button near the top or the bottom of the form so users can find it easily.
Steps
- Create an HTML form with the <form> tag.
- Create several options that the user can type in information or click a selection button, or do something.Advertisement
- Create your reset button. Type the <input type="reset"> tag into the code towards the top and/or bottom of the HTML form.
- Close the form after all input fields are entered with a final </form> tag.
- Save and preview your new adjusted form with the new reset button. Try it out, to see if it works correctly; click a selection or type a value and then click the reset button.
Community Q&A
- QuestionI have done the coding right, but the reset won't work. What should I do?Community Answerif you are trying to reset the HTML form's fields by clicking a button, you should call a javascript function through that button and, in that function, you would be able to access all HTML forms' input fields and reset them to whatever you want.
Video
Tips
- Give the input boxes you ask the visitor to enter, values into names with the 'name="NameHere" attribute.Thanks
About This Article
Is this article up to date?
⚠️ Disclaimer:
Content from Wiki How English language website. Text is available under the Creative Commons Attribution-Share Alike License; additional terms may apply.
Wiki How does not encourage the violation of any laws, and cannot be responsible for any violations of such laws, should you link to this domain, or use, reproduce, or republish the information contained herein.
- - A few of these subjects are frequently censored by educational, governmental, corporate, parental and other filtering schemes.
- - Some articles may contain names, images, artworks or descriptions of events that some cultures restrict access to
- - Please note: Wiki How does not give you opinion about the law, or advice about medical. If you need specific advice (for example, medical, legal, financial or risk management), please seek a professional who is licensed or knowledgeable in that area.
- - Readers should not judge the importance of topics based on their coverage on Wiki How, nor think a topic is important just because it is the subject of a Wiki article.