HTMLLabelElement:control 属性
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
HTMLLabelElement.control
只读属性返回与 <label>
元素相关联的控件(以 HTMLElement
类型或其派生类的对象的形式)的引用,如果标签未与控件关联,则为 null
。
值
HTMLElement
派生对象,表示与 <label>
关联的控件,如果标签是单独的,则为 null
。
备注:
如果这个属性有值且 HTMLLabelElement.htmlFor
有值,HTMLLabelElement.htmlFor
属性必须引用相同的控件。
规范
Specification |
---|
HTML # dom-label-control-dev |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
control |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on 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.