Javascript Reference
Categories: event

javascript event keyCode

@Aug. 15, 2009, 12:10 p.m.
keyCode Firefox/Netscape/NN 6 IE 4 Chrome/Safari/DOM n/a



Slightly different characteristics for IE and Netscape 6, but the two browser classes treat the keyCode property the same way for onkeydown and onkeyup events. For these events, the keyCode property returns the code associated with the keyboard key, irrespective of the character that might be generated by that key. On a typical Latin character set keyboard, the A key generates the code 65. Modifier keys generate their own events and codes as they are pressed and released.


For the onkeypress event, only IE returns a significant value, corresponding to the Unicode value of the actual character displayed in a text box by typing the character (e.g., 65 for "A" and 97 for "a"). The equivalent property in Netscape 6 for the onkeypress event is charCode

if (evt.keyCode == 65) {




purchase atorvastatin online <a href="">order atorvastatin 80mg for sale</a> buy atorvastatin 40mg sale
Ovybtk - 3 months
order generic lipitor 40mg <a href="">atorvastatin 10mg uk</a> buy lipitor generic
Vcpgdk - 3 months

Powered by Linode.