This page was translated from English by the community.Learn more and join the MDN Web Docs community.
HTMLLabelElement
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015년 7월.
HTMLLabelElement 인터페이스는<label> 요소의 특정한 속성에 접근할 수 있도록 합니다. 이 인터페이스는 기본HTMLElement 인터페이스의 메서드와 속성을 상속합니다.
In this article
인스턴스 속성
부모HTMLElement 로부터 상속받은 속성들
HTMLLabelElement.control읽기 전용HTMLElement는 라벨과 연관되어 있는 컨트롤을 나타냅니다.HTMLLabelElement.form읽기 전용HTMLFormElement객체는 라벨이 지정된 컨트롤러와 연관이 있는 폼을 나타냅니다. 연관되어 있는 컨트롤이 없거나, 해당 컨트롤이 폼 내부에 존재하지 않는 경우에null을 반환합니다. 다시 말해서, 이는 단순히HTMLLabelElement.control.form단축 속성입니다.HTMLLabelElement.htmlFor라벨이 지정된 컨트롤의 ID 문자열을 포함합니다. 이는
for특성을 반영합니다.
참고 :for 특성을 프로그래밍 방식으로 지정하기 위해서는,htmlFor 을 사용하세요.
인스턴스 메서드
특정 메서드가 존재하지 않습니다.HTMLElement 로부터 메서드를 상속받습니다.
명세서
| Specification |
|---|
| HTML> # htmllabelelement> |
브라우저 호환성
같이 보기
- 이 인터페이스를 구성하는 HTML 요소:
<label> <form>HTMLFormElement