View Full Version : onClick
01-04-2004, 06:23 PM
Is it possible with the onClick to simulate key strokes?
The Dingbat: :)
01-05-2004, 09:36 AM
What I really looking for is this.
Any key stroke = to the enter key, or onClick anywhere on screen = to enter key.
Is it possible??????????
Some of the keys (F1, F5, F11, Esc... etc.) have defined roles within the browser's economy and you can not change their meaning, as far as I know.
Regarding Enter key... Well, Enter key may activate a submit button (or a focused button) but, if there is no such a thing on the page, (or you had not focused the Address bar) Enter will do nothing, so even if you can simulate the Enter key, that will do nothing either... :D
I think you must explain what kind of action you need, than you simply use onkeyup or onkeydown event handlers to fire that action or function or whichever...
<body onkeyup ="alert('you pressed a key')">
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.