This example demonstrates how to use the onreset event for a FORM object. Reset the form by clicking the first button (Input type=reset) or second button (form.reset()). The only difference between the two buttons is that the second button invokes the reset method of the FORM object and the first button is of input type=reset. When either button is pressed the FORM resets, resulting in the onreset event call on the FORM object. The onreset event calls an event handler which in turn adds the text "Resetting form." to the text area below.
Form status