Mega Code Archive

 
Categories / JavaScript Reference / Javascript Properties
 

KeyCode Example

<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 While The Browser is in Focus</p> <body onKeyDown="function2();" onKeyPress="function1();"> </body> </html>