JavaScript » Button » form

Syntax:
button.form

This property returns a reference to the button's parent form.

This property returns a reference to the Button object's parent Form.

Examples

Code:
<INPUT NAME="myButton" TYPE="button" VALUE="Form name?" onClick= "document.write (document.myForm.myButton.form.name)">
Explanation:

This code dispays the name of the Button object's parent Form when it is clicked and assumes, for the purposes of this example, that the Form is called "myForm".