accessKeyLabel

HTMLElement.accessKeyLabel 읽기 전용 속성은 엘리먼트의 할당된 접근키를 나타내는 String 를 반환합니다. 존재하지 않는 경우 빈 문자열을 반환합니다.

구문

label = element.accessKeyLabel

예시

JavaScript

var node = document.getElementById('btn1');
if (node.accessKeyLabel) {
  node.title += ' [' + node.accessKeyLabel + ']';
} else {
  node.title += ' [' + node.accessKey + ']';
}

node.onclick = function () {
  var p = document.createElement('p');
  p.textContent = 'Clicked!';
  node.parentNode.appendChild(p);
};

HTML

<button accesskey="h" title="Caption" id="btn1">Hover me</button>

Result

명세

명세 상태 코멘트
HTML Living Standard
The definition of 'HTMLElement.accessKeyLabel' in that specification.
Living Standard 초기 정의로부터 변경 사항 없음.
HTML 5.1 Recommendation 제거됨. pull w3c/html#144issue w3c/html#99WICG discussion.
HTML5
The definition of 'HTMLElement.accessKeyLabel' in that specification.
Recommendation HTML Living Standard, 초기 정의의 스냅샷.

브라우저 호환성

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
accessKeyLabelChrome No support NoEdge No support NoFirefox Full support 8IE ? Opera ? Safari ? WebView Android No support NoChrome Android No support NoFirefox Android Full support 8Opera Android ? Safari iOS ? Samsung Internet Android ?

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown

함께 보기