HTMLLabelElement: form property
MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونهکد
{{APIRef("HTML DOM")}}
The **form** read-only property of the {{domxref("HTMLLabelElement")}} interface returns an {{domxref("HTMLFormElement")}} object that owns the {{domxref("HTMLLabelElement.control", "control")}} associated with this {{HTMLElement("label")}}, or null if this label is not associated with a labelable form-associated element ({{htmlelement("button")}}, {{htmlelement("input")}}, {{htmlelement("output")}}, {{htmlelement("select")}}, {{htmlelement("textarea")}}, or form-associated custom elements) that is owned by a form.
Unlike form-associated elements, the <label> element does not have a [form](/en-US/docs/Web/HTML/Reference/Attributes/form) attribute. This property does not reflect any HTML attribute, but is just a shortcut for label.control.form.
Value
An {{domxref("HTMLFormElement")}} or null.
Specifications
{{Specifications}}
Browser compatibility
{{Compat}}
See also
- {{domxref("HTMLLabelElement")}}
- {{domxref("HTMLInputElement.form")}}
- {{domxref("HTMLFormElement")}}
- {{HTMLElement("label")}}
- HTML forms guide