No edit summary |
m (Creating a page that changes on pressing keyboard keys with JavaScript moved to Howto create a webpage that changes by pressing keyboard keys with JavaScript) |
(No difference)
|
Revision as of 17:53, 8 February 2006
You can use the following script:
<SCRIPT language=JavaScript> document.onkeypress=j; function j(){ {if(event.keyCode==27)document.onkeypress=f} {if(event.keyCode==97)window.location="URL"} . . . } </SCRIPT>
How to use it...
keyCode defines the key that you press.
1 2 3 4 27 38 arrow up 40 arrow down 37 arrow left 39 arrow right 97 98 : b