Creating a shortcut key for the letter j to redirect to a url using jquery
问题 Using jQuery (if it helps), I'd like to create a shortcut key for the letter J , so when someone clicks on the keyboard letter J , it redirects to a webpage. Is this possible? 回答1: The short answer is yes, this is possible. See Jquery Events Keypress If you want it to be a universal shortcut then simply bind $(document).keypress(function(event) { if (event.which === 106) { window.location = 'your_url'; } }); Remember to make it very clear to the users that this will happen. There's nothing