Window.onreset

« DOM Reference

Summary

An event handler for the reset event on the window.

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>

Notes

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

Specification

Not part of specification.

Document Tags and Contributors

Contributors to this page: Sheppy, LibreGeekingKid, Callek, teoli, Rappo
Last updated by: teoli,
Hide Sidebar