04-15-2011, 02:32 AM
Hi,
I need to implement keyboard shortcuts on my website. I've searched for a few minutes but I did not find anything concrete. Basically, what I want to do is "attach" a keyboard shortcut to a certain link so that when I click the left arrow it goes to a page, and when I click the right arrow it goes to another page.
So all I would have to do is call a JavaScript file and in my HTML do something like this:
Code:
Whereas the id has to do with the JavaScript file. I hope I made myself clear.
I need to implement keyboard shortcuts on my website. I've searched for a few minutes but I did not find anything concrete. Basically, what I want to do is "attach" a keyboard shortcut to a certain link so that when I click the left arrow it goes to a page, and when I click the right arrow it goes to another page.
So all I would have to do is call a JavaScript file and in my HTML do something like this:
Code:
Code:
<a href="page1.html" id="keyboard_shortcuts">Page 1</a>
<a href="page2.html" id="keyboard_shortcuts">Page 2</a>
Whereas the id has to do with the JavaScript file. I hope I made myself clear.