HTMLLabelElement: control property
MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونهکد
{{APIRef("HTML DOM")}}
The read-only **HTMLLabelElement.control** property returns a reference to the control (in the form of an object of type {{domxref("HTMLElement")}} or one of its derivatives) with which the {{HTMLElement("label")}} element is associated, or null if the label isn't associated with a control.
Value
An {{domxref("HTMLElement")}} derived object representing the control with which the {{HTMLElement("label")}} is associated, or null if the label stands alone.
توجه: If this property has a value and {{domxref("HTMLLabelElement.htmlFor")}} has a value, the {{domxref("HTMLLabelElement.htmlFor")}} property must refer to the same control.
Specifications
{{Specifications}}
Browser compatibility
{{Compat}}
See also
- {{domxref("HTMLLabelElement")}}
- {{domxref("HTMLElement")}}
- {{HTMLElement("label")}}
- HTML forms guide