HTML DOM accessKey PropertyElement Object
Definition and Usage
The accessKey property sets or returns an accesskey for an element.
An accesskey specifies a shortcut key to activate/focus an element.
Note: The way of accessing the shortcut key is varying in different browsers:
- Internet Explorer: [ALT] + accesskey
- Chrome, Firefox, Safari: [ALT] [SHIFT] + accesskey
- Opera: [SHIFT] [ESC] + accesskey
However, in most browsers the shortcut key can be set to another combination of keys.
Tip: The behavior if more than one element has the same access key differs:
- IE, Firefox: The next element with the pressed access key will be activated
- Chrome, Safari: The last element with the pressed access key will be activated
- Opera: The first element with the pressed access key will be activated
The accessKey property is supported in all major browsers.
Set the access key of a link:
<a id="w3s" href="http://www.w3schools.com/">W3Schools</a>
Try it yourself »
Thank You For Helping Us!
Your message has been sent to W3Schools.