<html> <body> <script language="JavaScript"> function function1() { x = event.keyCode; alert("Unicode Value: "+x); } function function2() { x = event.keyCode; alert("Keyboard Value: "+x); } </script> <p>Press Any Key</p> <body onKeyDown="function2();" onKeyPress="function1();"> </body> </html>