Legend form property
Example
Return the form containing
var x = document.getElementById("myLegend").form.id;
x The output is:
myForm
Try it »
Definition and Usage
The form property returns a reference to the form that contains the legend.
If successful, this property returns a form object.
**Note:** This property is read-only.
Browser support





All major browsers support the form attribute.
Syntax
legendObject
.form
Technical Details
| Return Value: | A reference to the form that contains the legend. If the legend is not inside a form, it returns null. |
|---|
Label Object