Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Keyboard shortcuts with JavaScript
#1
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:
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. Smile
Reply


Messages In This Thread
Keyboard shortcuts with JavaScript - by rockclimber66 - 04-15-2011, 02:32 AM
RE: Keyboard shortcuts with JavaScript - by Gonzo - 04-18-2011, 07:10 PM
RE: Keyboard shortcuts with JavaScript - by Danny - 05-07-2011, 01:21 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Free Worker HTML, CSS, Javascript ImFocuzz 2 1,281 04-05-2014, 10:01 PM
Last Post: VHPanda
  [MyBBError Message] PLEASE HELP ME!! Enable Javascript Registration Error iRun 4 1,921 01-26-2012, 03:13 PM
Last Post: iRun
  Close Tab With Javascript. Qua 3 1,410 07-02-2011, 07:25 AM
Last Post: djakariuz
  Javascript Help. Form Submission. JohnRonder 0 890 02-01-2011, 11:12 AM
Last Post: JohnRonder
  [javascript] Link of Minute zone 3 1,093 12-11-2009, 02:16 AM
Last Post: Sagittarius

Forum Jump:


Users browsing this thread: 5 Guest(s)