HTML onreset event Attribute

❮ HTML Event Attributes


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


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


Attribute Values

Value Description
script Specifies the script to be run on onreset

Technical Details

Supported HTML elements:

❮ HTML Event Attributes