Fieldset formProperty
Example
Returns the id of the form containing the <fieldset> element:
var x = document.getElementById("myFieldset").form.id;
xThe output result is:
myForm
Try it Yourself »
Definition and Usage
The form property returns a reference to the form containing the fieldset.
If successful, this property returns a form object.
Note:This property is read-only.
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the form property.
Syntax
fieldsetObject.form
Technical Details
| Return Value: | A reference to the form containing the fieldset. Returns null if the fieldset is not within a form. |
|---|
Other Extensions
Fieldset Object