Advertisement
Home Open Editor ❯

HTML onreset event Attribute

Example

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

Try this code ❯

Meaning

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


Standard Syntax

<element onreset="script">


Advertisement

Attribute Values

Value Description
script Specifies the script to be run on onreset

Technical Details

Supported HTML elements:

<form>
Home Open Editor ❯
Advertisement