HTML DOM Legend form properties
Examples
Returns Form <legend> element's id:
var x = document.getElementById("myLegend").form.id;
x The output is:
myForm
try it"
Definition and Usage
form property returns a reference to the form of the legend.
If successful, the property returns a form object.
Note: This property is read-only.
Browser Support
All major browsers support form property.
grammar
legendObject .form
technical details
return value: | It contains a reference to the legend of the form. If the legend is not within a form, then return null. |
---|