Keyboard event detection (Key Tracker) | ||
| ||
| <!--This is developed by Nepali Guys for further information please email us at ha.p@mailcity.com shivascm@hotmail.com --> <html> <head> <title>Simple javascript key tracker</title> <script language="javascript"> function handlePress(events) { var whichCode = (window.Event) ? events.which : events.keyCode; if (whichCode==13) alert("You have pressed Enter key"); else if (whichCode==32) alert("You have pressed space key"); else alert("You have pressed the character " + String.fromCharCode(whichCode)); } </script> </head> <BODY onKeyPress="handlePress(event)"> <form> <table border=0> <tr> <td><font size=4 face=verdana><b>press any key </b></font></td> </tr> </table> </form> </body> </html> | ||
| | ||
| |