revision:
revision:
It is used to activate/focus an element. Its lvalue must be a single character (a letter or a digit). The shortcut is varying in different browsers:
set the accesskey: <element accesskey="character">
get the accesskey: element.accesskey
property value:
character: a single character that specifies the shortcut key to activate/focus the element.
<a href="https://lwitters.com" accesskey="l">lwitters (key: l)</a><br> <a href="https://wikipedia.com" accesskey="w">Wikipedia (key: w)</a>
<a>If you need to relax, press the <strong><u>S</u></strong>tress reliever! /a> <button accesskey="s">Stress reliever</button>
<div> <a id="prop1" href="https://www.lwitters.com/">my website</a><br> <p>The implementation is different in different browsers: in Chrome, "Alt + w".</p> <a id="prop2"></a> </div> <script> document.getElementById("prop1").accessKey = "w"; let key = document.getElementById("prop1").accessKey; document.getElementById("prop2").innerHTML = "accesskey : " + key; </script>