class method Form.reset

View source on GitHub →

Form.reset(form) → Element

Resets a form to its default values.

Example usage:

 // equivalent:
 // both have the same effect as pressing the reset button

This method allows you to programatically reset a form. It is a wrapper for the reset() method native to HTMLFormElement.

This method can be called either as an instance method or as a generic method. If calling as a generic, pass the instance in as the first argument.