Legend formProperty

Label 对象参考手册Label Object

Example

Return the id of the form containing the <legend> element:

var x = document.getElementById("myLegend").form.id;

xThe output result is:

myForm

Try it yourself »

Definition and Usage

The form property returns a reference to the form containing the legend.

If successful, this property returns a form object.

Note:This property is read-only.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the form property.


Syntax

legendObject.form

Technical Details

Return value: A reference to the form containing the legend. Returns null if the legend is not in a form.


Label 对象参考手册Label Object

Other Extensions