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

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

Syntax

window.onreset = funcRef;

Parameters

  • funcRef is a reference to a function.

Example

<html>
<script>
function reg() {
  window.captureEvents(Event.RESET);
  window.onreset = hit;
}
 
function hit() {
  alert('hit');
}
</script>

<body onload="reg();">
  <form>
    <input type="reset" value="reset">
  </form>
  <div id="d"> </div>
</body>
</html>

Specification

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

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
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 ?

Legend

Full support  
Full support
Compatibility unknown  
Compatibility unknown

Document Tags and Contributors

Last updated by: mfluehr,