Input Button form attribute
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 attribute
Example
Example
The following example returns the id of the form that contains the button:
Try it »
Button Object