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> tag
Example
Return the id of the form containing the <legend> element:
var x = document.getElementById("myLegend").form.id;
Syntaks
legendObject.form
Tekniske detaljer
Returværdi: |
Reference til formularelement, der indeholder legend. Returnerer null, hvis legend ikke er i formularen. |
---|
Browser support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |