Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

keyCode property

Sets or retrieves the Unicode key code associated with the key that caused the event.

Syntax

JavaScript

p = object.keyCode

 

Property values

Type: Integer

the Unicode key code.

Remarks

The property is used with the onkeydown, onkeyup, and onkeypress events.

The property's value is 0 if no key caused the event.

See also

event

 

 

Show:
© 2015 Microsoft