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

HTML DOM Form reset() method

Form reset() method

Form Object Reference Form Object


Definition and Usage

The reset() method can reset the values of all elements in the form (same effect as clicking the Reset button).

Syntax

formObject.reset()


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the reset() method


Example

Example

Create a reset button for the form:

First name:

Last name:

Try it »


Form Object Reference Form Object