'keyCode' Example : Key Event : Event JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Event » Key Event »

 

'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</p>
<body onKeyDown="function2();" onKeyPress="function1();">
</body>
</html>

    
      
      



-

1 Comments

dolly

Tuesday 24th of November 2009

plz give me the example for keycode in which number is checked at my email address this is not included in your site example very bad ,u must include it

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Event
» Key Event