HTMLLabelElement.form
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 |
---|
HTML Standard (HTML) # dom-label-form-dev |
Browser compatibility
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
form |
1 |
12 |
1 |
6 |
≤12.1 |
3 |
1 |
18 |
4 |
≤12.1 |
1 |
1.0 |
See also
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/form