HTMLLabelElement: htmlFor 속성

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.htmlFor 속성은 for 컨텐츠 속성의 값을 반영하는 속성입니다. 이는 스크립트에 접근할 수 있는 해당 속성이 컨텐츠 속성 for 의 값을 설정하거나 읽을 수 있다는 것을 의미하며, 라벨과 연결된 컨트롤 요소의 ID 에 해당합니다.

컨트롤과 연결된 요소의 ID 문자열을 포함하는 문자열입니다.

참고 : 이 속성에 값이 있다면, HTMLLabelElement.control 속성 또한 동일한 컨트롤을 참조해야 합니다.

명세서

Specification
HTML
# dom-label-htmlfor

브라우저 호환성

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
htmlFor

Legend

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

Full support
Full support

같이 보기