document.addEventListener('keydown',function(e){ if(e.keyCode==65)//key code for 'a' location="http://google.com" })
<!DOCTYPE html> <html> <body> <p>Click the button to open a new browser window.</p> <button onclick="myFunction()">Try it</button> <script> function myFunction() { window.open("https://www.xyz.com"); } </script> </body> </html>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)