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 型のオブジェクトまたはその派生物のうちの 1 つ)を返します。ラベルがコントロールと関連付けられていない場合は null を返します。

HTMLElement の派生オブジェクトで、この <label> が関連付けられているコントロールを表します。ラベルが孤立している場合は null になります。

メモ: このプロパティに値があり、 HTMLLabelElement.htmlFor に値がある場合、 HTMLLabelElement.htmlFor プロパティは必ず同じコントロールを参照します。

仕様書

Specification
HTML
# dom-label-control-dev

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
control

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

関連情報