accessKeyLabel
HTMLElement.accessKeyLabel
읽기 전용 속성은 엘리먼트의 할당된 접근키를 나타내는 String
를 반환합니다. 존재하지 않는 경우 빈 문자열을 반환합니다.
구문
js
label = element.accessKeyLabel;
예시
JavaScript
js
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
html
<button accesskey="h" title="Caption" id="btn1">Hover me</button>
Result
명세
Specification |
---|
HTML # dom-accesskeylabel |
브라우저 호환성
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
accessKeyLabel |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- See implementation notes.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
함께 보기
element.accessKey
- accesskey 전역 속성.