JavaScript Tutorial/Document/onkeypress

Материал из Web эксперт
Перейти к: навигация, поиск

document.onkeypress

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



   <source lang="javascript">

<html>

   <head>
   <script language="JavaScript1.2">
   
   </script>
   </head>
   <body>
   press a key within this document.
   </body>
   </html></source>
   
  

Document onkeypress event action

   <source lang="javascript">

<html> <head> <script language="JavaScript" type = "text/javascript">

</script> <title>Keyboard Event</title> </head> <body> </body> </html></source>