HTMLElement.accessKey property sets the keystroke which a user can press to jump to a given element.

HTMLElement.accessKey property is seldom used because of its multiple conflicts with already present key bindings in browsers. To work around this, browsers implement accesskey behavior if the keys are pressed with other "qualifying" keys (such as Alt + accesskey).

浏览器兼容性

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. 更新 GitHub 上的兼容性数据
桌面 移动
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
accessKey Chrome 完整支持 17 Edge 完整支持 12 Firefox 完整支持 5 IE ? Opera 完整支持 Yes Safari 完整支持 6 WebView Android 完整支持 4.4 Chrome Android 完整支持 18 Firefox Android 完整支持 5 Opera Android 完整支持 Yes Safari iOS 完整支持 Yes Samsung Internet Android 完整支持 1.0

图例

完整支持

完整支持

兼容性未知 ?

兼容性未知

另请参阅

元数据

  • 最后修改:
  1. DOM (文档对象模型)
  2. HTMLElement
  3. 特性
    1. contentEditable
    2. contextMenu
    3. dir
    4. hidden
    5. innerText
    6. isContentEditable
    7. lang
    8. offsetHeight
    9. offsetLeft
    10. offsetParent
    11. offsetTop
    12. offsetWidth
    13. onabort
    14. onanimationcancel
    15. onanimationend
    16. onanimationiteration
    17. onauxclick
    18. onblur
    19. oncancel
    20. oncanplay
    21. oncanplaythrough
    22. onchange
    23. onclick
    24. onclose
    25. oncontextmenu
    26. oncopy
    27. oncuechange
    28. oncut
    29. ondblclick
    30. ondurationchange
    31. onended
    32. onerror
    33. onfocus
    34. onformdata
    35. ongotpointercapture
    36. oninput
    37. oninvalid
    38. onkeydown
    39. onkeypress
    40. onkeyup
    41. onload
    42. onloadeddata
    43. onloadedmetadata
    44. onloadend
    45. onloadstart
    46. onlostpointercapture
    47. onmousedown
    48. onmouseenter
    49. onmouseleave
    50. onmousemove
    51. onmouseout
    52. onmouseover
    53. onmouseup
    54. onpaste
    55. onpause
    56. onplay
    57. onplaying
    58. onpointercancel
    59. onpointerdown
    60. onpointerenter
    61. onpointerleave
    62. onpointermove
    63. onpointerout
    64. onpointerover
    65. onpointerup
    66. onreset
    67. onresize
    68. onscroll
    69. onselect
    70. onselectionchange
    71. onselectstart
    72. onsubmit
    73. ontouchcancel
    74. ontouchstart
    75. ontransitioncancel
    76. ontransitionend
    77. onwheel
    78. outerText
    79. title
  4. 方法
    1. click()
    2. forceSpellCheck()
  5. 事件
    1. animationcancel
    2. animationend
    3. animationiteration
    4. animationstart
    5. beforeinput
    6. change
    7. gotpointercapture
    8. input
    9. lostpointercapture
    10. pointercancel
    11. pointerdown
    12. pointerenter
    13. pointerleave
    14. pointermove
    15. pointerout
    16. pointerover
    17. pointerup
    18. transitioncancel
    19. transitionend
    20. transitionrun
    21. transitionstart
  6. 继承:
    1. 元素
    2. 节点
    3. EventTarget
  7. DOM 相关页面
    1. AbortController
    2. AbortSignal
    3. AbstractRange
    4. Attr
    5. ByteString
    6. CDATASection
    7. CSSPrimitiveValue
    8. CSSValue
    9. CSSValueList
    10. CharacterData
    11. ChildNode
    12. 注释
    13. CustomEvent
    14. DOMConfiguration
    15. DOMError
    16. DOMErrorHandler
    17. DOMException
    18. DOMImplementation
    19. DOMImplementationList
    20. DOMImplementationRegistry
    21. DOMImplementationSource
    22. DOMLocator
    23. DOMObject
    24. DOMParser
    25. DOMPoint
    26. DOMPointInit
    27. DOMPointReadOnly
    28. DOMRect
    29. DOMString
    30. DOMTimeStamp
    31. DOMTokenList
    32. DOMUserData
    33. Document
    34. DocumentFragment
    35. DocumentType
    36. 元素
    37. ElementTraversal
    38. Entity
    39. EntityReference
    40. 事件
    41. EventTarget
    42. HTMLCollection
    43. MutationObserver
    44. 节点
    45. NodeFilter
    46. NodeIterator
    47. NodeList
    48. NonDocumentTypeChildNode
    49. ProcessingInstruction
    50. PromiseResolver
    51. 范围
    52. StaticRange
    53. 文本
    54. TextDecoder
    55. TextEncoder
    56. TimeRanges
    57. TreeWalker
    58. TypeInfo
    59. USVString
    60. UserDataHandler
    61. XMLDocument