HTMLFormElement: reset event

The reset event fires when a <form> is reset.

Bubbles Yes (although specified as a simple event that doesn't bubble)
Cancelable Yes
Interface Event
Event handler property GlobalEventHandlers.onreset


This example uses EventTarget.addEventListener() to listen for form resets, and logs the current Event.timeStamp whenever that occurs.


<form id="form">
  <label>Test field: <input type="text"></label>
  <button type="reset">Reset form</button>
<p id="log"></p>


function logReset(event) {
  log.textContent = `Form reset! Time stamp: ${event.timeStamp}`;

const form = document.getElementById('form');
const log = document.getElementById('log');
form.addEventListener('reset', logReset);



Specification Status Comment
HTML Living Standard
The definition of 'reset' in that specification.
Working Draft No change
HTML 5.2
The definition of 'reset' in that specification.
Recommendation No change
HTML 5.1
The definition of 'reset' in that specification.
Recommendation Added info that the event is not trusted.
The definition of 'reset' in that specification.
Recommendation Initial definition

Browser compatibility

Update compatibility data on GitHub
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
reset eventChrome Full support YesEdge Full support 12Firefox Full support YesIE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes


Full support  
Full support

See also