The button's onClick event handler uses this.form to refer to the parent form, myForm . The following example shows a form with several elements. The following example uses an object reference, rather than the this keyword, to refer to a form. The code returns a reference to myForm , which is a form containing myButton . See also Form handleEvent Invokes the handler for the specified event.
Parameters event The name of an event for which the object has an event handler.
Description For information on handling events, see the Client-Side JavaScript Guide . A string specifying the button's name. Property of Button Implemented in JavaScript 1.0 Security JavaScript 1.1. This property is tainted by default. For information on data tainting, see the Client-Side JavaScript Guide .