Get to know MDN better
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
<input> elements of type reset are rendered as buttons, with a default click event handler that resets all inputs in the form to their initial values.
Note: You should usually avoid including reset buttons in your forms. They're rarely useful, and are instead more likely to frustrate users who click them by mistake (often while trying to click the submit button).
An <input type="reset"> element's value attribute contains a string that is used as the button's label providing the button with an accessible description. Buttons such as reset don't have a value otherwise.
If you don't specify a value, you get a button with the default label (typically "Reset," but this will vary depending on the user agent):
<input type="reset"> buttons are used to reset forms. If you want to create a custom button and then customize the behavior using JavaScript, you need to use <input type="button">, or better still, a <button> element.
We'll begin by creating a basic reset button:
This renders like so:
Try entering some text into the text field, and then pressing the reset button.
To add a keyboard shortcut to a reset button — just as you would with any <input> for which it makes sense — you use the accesskey global attribute.
In this example, r is specified as the access key (you'll need to press r plus the particular modifier keys for your browser/OS combination; see accesskey for a useful list of those).
The problem with the above example is that there's no way for the user to know what the access key is! This is especially true since the modifiers are typically non-standard to avoid conflicts. When building a site, be sure to provide this information in a way that doesn't interfere with the site design (for example by providing an easily accessible link that points to information on what the site access keys are). Adding a tooltip to the button (using the title attribute) can also help, although it's not a complete solution for accessibility purposes.
To disable a reset button, specify the disabled attribute on it, like so:
You can enable and disable buttons at run time by setting disabled to true or false; in JavaScript this looks like btn.disabled = true or btn.disabled = false.
Note: See the <input type="button"> page for more ideas about enabling and disabling buttons.
Buttons don't participate in constraint validation; they have no real value to be constrained.
We've included basic examples above. There isn't really anything more to say about reset buttons.
| Value | A string used as the button's label |
| Events | click |
| Supported common attributes | type and value |
| IDL attributes | value |
| DOM interface | HTMLInputElement |
| Methods | None |
| Implicit ARIA Role | button |
| HTML # reset-button-state-(type=reset) |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Apr 22, 2026 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.