The read-only HTMLLabelElement.form
property returns an HTMLFormElement
object which represents the form of which the label's associated control is a part, or null if there is either no associated control, or if that control isn't in a form.
This property is just a shortcut for HTMLLabelElement.control.form
.
Syntax
form = HTMLLabelElement.form
Value
An HTMLFormElement
which represents the form with which the label's control
is associated. If control
is null
(meaning the label isn't associated with a control), or if the control isn't part of a form, this property returns null
.
Specifications
Specification | Status | Comment |
---|---|---|
HTML Living StandardThe definition of 'form' in that specification. | Living Standard | Initial definition |
Browser compatibility
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Update compatibility data on GitHub
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
form
|
Chrome
Full support Yes |
Edge
Full support 12 |
Firefox
Full support 1 |
IE
Full support Yes |
Opera
Full support Yes |
Safari
Full support Yes |
WebView Android
Full support Yes |
Chrome Android
Full support Yes |
Firefox Android
Full support 4 |
Opera Android
Full support Yes |
Safari iOS
Full support Yes |
Samsung Internet Android
Full support Yes |
Legend
- Full support
- Full support
See also
HTMLLabelElement.form by Mozilla Contributors is licensed under CC-BY-SA 2.5.