Legend form attribute

Definition and Usage

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

This property returns the form object on success.

Note:This property is read-only.

See also:

HTML Reference Manual:HTML <legend> Ετικέτα

Example

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

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

Δοκιμάστε το προσωπικά

Γλώσσα

legendObject.form

Τεχνικά Στοιχεία

Αποτελεσματική Επιστροφή:

Αναφορά στο στοιχείο φόρμας που περιέχει το legend.

Αν το legend δεν βρίσκεται στο έξοδο, επιστρέφει null.

Υποστήριξη Περιηγητή

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Υποστήριξη Υποστήριξη Υποστήριξη Υποστήριξη Υποστήριξη