ketankshah
IS-IT--Management
I want to trap the spacebar key on a link. i.e. If the focus is on a link and the user presses spacebar, then I want to call a function otherwise not.
<a href="#" onkeydown="check()"><img src="check.gif"></a>
This code will call the check function irrespective of any key is being pressed. I want to call it only when the user presses spacebar.
How can I do it?
Ketan
<a href="#" onkeydown="check()"><img src="check.gif"></a>
This code will call the check function irrespective of any key is being pressed. I want to call it only when the user presses spacebar.
How can I do it?
Ketan