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 Standard
# dom-label-control-dev

浏览器兼容性

BCD tables only load in the browser

参见