'keyCode' Syntax and Note : keyCode « Javascript Properties « JavaScript Reference

Home
JavaScript Reference
1.Event Handlers Reference
2.Javascript Collections
3.Javascript Methods
4.Javascript Objects
5.Javascript Properties
JavaScript Reference » Javascript Properties » keyCode 
'keyCode' Syntax and Note

Note:

Read-only property. 
Returns the key code pressed. 
Used with the onKeyDown, onKeyUp, and onKeyPress events.

onKeyPress event,        the return value is in Unicode. 
                         This code distinguishes between uppercase and 
                         lowercase characters. 
---------------------------------------------------------------------------
onKeyDown and            the return value code is a character code.
onKeyUp events,          
    
Syntax:
    
window.event.keyCode

    

      
      
Related examples in the same category
1.'keyCode' Example
2.'keyCode' is applied to
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.