Home
Run >
<!DOCTYPE html> <html> <head> <!-- www.techstrikers.com --> <title>My first Javascript code</title> </head> <body bgcolor="#bnde45"> <fieldset> <legend>Javascript OnKeyDown Event</legend> <script type="text/javascript"> function GetChar (event){ var keyCode = ('which' in event) ? event.which : event.keyCode; alert ("The Unicode key code is: " + keyCode); } </script> </HEAD> <BODY> <input size="40" value="Write a character into this field!" onkeydown="GetChar (event);"/> </fieldset> </body> </html>