HTML | DOM Button form Property
The Button form property in HTML DOM is used to return the reference of the form containing the button. It is a read-only property and returns the form object on success.
Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML course.
Return Value: It returns a reference to the form element containing the button. It returns NULL if the button is not in the form.
Example: This example shows the working of the Button form property:
- Before clicking the button:
- After clicking the button:
Supported Browsers: The browser supported by HTML DOM Button form Property are listed below:
- Google Chrome
- Internet Explorer
- Mozilla Firefox