Javascript examples for DOM:Element accessKey
Element accessKey Property - Get the accesskey of a link:
<!DOCTYPE html> <html> <body> <a id="myId" accesskey="w" href="https://www.java2s.com/">java2s.com</a> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {// w ww .j a v a 2 s . co m var x = document.getElementById("myId").accessKey; document.getElementById("demo").innerHTML = x; } </script> </body> </html>