HTML onreset event Attribute

❮ HTML Event Attributes

Example

<form onreset="myFunction()">
  Enter name: <input type="text" value="John">
  <input type="reset">
</form>

Meaning

The onreset attribute specifies that the form is being reset, possibly by the click of a reset button.


Standard Syntax

<element onreset="script">

Browser Support




Status







Attribute Values

Value Description
script Specifies the script to be run on onreset



Technical Details

Supported HTML elements:

<form>
❮ HTML Event Attributes