Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Form onreset Event

Form onreset Event

Form Object Reference Form Object


Definition and Usage

The onreset event is called after the reset button is clicked to submit the form.

Syntax

onreset="

JavaScriptCode

"

Parameters Description
JavaScriptCode Required. Specifies the JavaScript code to be executed after the event is triggered.

Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the onreset event


Example

Example

Display an alert box after the reset (reset) button is clicked:

Firstname:

Lastname:

Try it »


Form Object Reference Form Object