Nuestros voluntarios aún no han traducido este artículo al Español. ¡Únete a nosotros y ayúdanos a traducirlo!
También puedes leer el artículo en English (US).

The onreset property of the GlobalEventHandlers mixin is an EventHandler that processes reset events.

The reset event fires when the user clicks a reset button in a form (<input type="reset">).


target.onreset = functionRef;


functionRef is a function name or a function expression. The function receives an Event object as its sole argument.


This example logs the current Event.timeStamp whenever you reset the form.


<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.onreset = logReset;



Specification Status Comment
HTML Living Standard
The definition of 'onreset' in that specification.
Living Standard  

Browser compatibility

Update compatibility data on GitHub
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
Basic supportChrome Full support YesEdge Full support YesFirefox Full support YesIE ? Opera ? Safari ? WebView Android Full support YesChrome Android Full support YesEdge Mobile Full support YesFirefox Android Full support YesOpera Android ? Safari iOS ? Samsung Internet Android ?


Full support  
Full support
Compatibility unknown  
Compatibility unknown

See also

Etiquetas y colaboradores del documento

Última actualización por: mfluehr,