document.onkeydown : onkeydown : Document JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Document » onkeydown »

 

document.onkeydown







The onkeydown event handler specifies what should happen when any key is pressed when the Document object is in focus.












<html>
    <head>
    <script language="JavaScript1.2">
    <!--
    document.onkeydown = myKeyDownHandler;

    function myKeyDownHandler(){
      alert("A key down event took place within the document!");
    }
    -->
    </script>
    </head>
    <body>
    press a key within this document.
    </body>
    </html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Document
» onkeydown