From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/zh-cn/web/api/htmllabelelement/index.html | 137 ++++++++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 files/zh-cn/web/api/htmllabelelement/index.html (limited to 'files/zh-cn/web/api/htmllabelelement') diff --git a/files/zh-cn/web/api/htmllabelelement/index.html b/files/zh-cn/web/api/htmllabelelement/index.html new file mode 100644 index 0000000000..e1be5ef609 --- /dev/null +++ b/files/zh-cn/web/api/htmllabelelement/index.html @@ -0,0 +1,137 @@ +--- +title: HTMLLabelElement +slug: Web/API/HTMLLabelElement +translation_of: Web/API/HTMLLabelElement +--- +
{{ APIRef("HTML DOM") }}
+ +

The HTMLLabelElement interface gives access to properties specific to {{HTMLElement("label")}} elements. It inherits from {{domxref("HTMLElement")}}. 

+ +

Properties

+ +

Inherits properties from its parent, {{domxref("HTMLElement")}}.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
accessKey{{domxref("DOMString")}}Reflects the {{htmlattrxref("accesskey", "label")}} HTML attribute.
control {{readonlyInline}}{{domxref("HTMLElement")}}The labeled control.
form {{readonlyInline}}{{domxref("HTMLFormElement")}}The form owner of this label.
htmlFor {{domxref("DOMString")}}The ID of the labeled control. Reflects the {{htmlattrxref("for", "label")}} attribute.
+ +

Methods

+ +

No specific method; inherits properties from its parent, {{domxref("HTMLElement")}}.

+ +

Specifications

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG', "forms.html#the-label-element", "HTMLAnchorElement")}}{{Spec2('HTML WHATWG')}}No change from {{SpecName("HTML5 W3C")}}.
{{SpecName('HTML5 W3C', "forms.html#the-label-element", "HTMLAnchorElement")}}{{Spec2('HTML5 W3C')}}The property accessKey is now defined on {{domxref("HTMLElement")}}.
+ The following property has been added: control.
{{SpecName('DOM2 HTML', 'html.html#ID-13691394', 'HTMLLabelElement')}}{{Spec2('DOM2 HTML')}}No change from {{SpecName("DOM1")}}.
{{SpecName('DOM1', 'level-one-html.html#ID-13691394', 'HTMLLabelElement')}}{{Spec2('DOM1')}}Initial definition.
+ +

Browser compatibility

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support{{CompatVersionUnknown}}{{CompatGeckoDesktop(1.0)}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureAndroidFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
Basic support{{CompatVersionUnknown}}{{CompatGeckoMobile(1.0)}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

See also

+ + -- cgit v1.2.3-54-g00ecf