Button form Property
Button Object
Definition and Usage
The form attribute returns a reference to the form that contains the button.
If the button is contained in a form, a form object is returned; otherwise null is returned.
Syntax
buttonObject.form
Browser support





All major browsers support the form property.
Example
Example
The following example returns the id of the form to which the button belongs:
The ID of the form containing the button:
Try it »
Button Object