Name

Form.reset( ) — reset the elements of a form

Availability

JavaScript 1.1

Synopsis

                  form.reset(  )

Description

The reset( ) method resets the specified form, restoring each element of the form to its default value, exactly as if a Reset button had been pressed by the user. The form’s onreset( ) event handler is first invoked and may prevent the reset from occurring by returning the value false.

Get JavaScript: The Definitive Guide, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.