原文地址:http://blog.csdn.net/chenhj1988918/article/details/7534922

keypress  api 文档:http://api.jquery.com/keypress/

    event.keycode值大全

   keycode  = BackSpace BackSpace

   keycode  = Tab Tab

   keycode  = Clear

   keycode  = Enter

   keycode  = Shift_L

   keycode  = Control_L

   keycode  = Alt_L

   keycode  = Pause

   keycode  = Caps_Lock

 keycode  = Escape Escape

 keycode  = space space

 keycode  = Prior

 keycode  = Next

 keycode  = End

 keycode  = Home

 keycode  = Left

 keycode  = Up

 keycode  = Right

 keycode  = Down

 keycode  = Select

 keycode  = Print

 keycode  = Execute

 keycode  = Insert

 keycode  = Delete

 keycode  = Help

 keycode  =  equal braceright

 keycode  =  exclam onesuperior

 keycode  =  quotedbl twosuperior

 keycode  =  section threesuperior

 keycode  =  dollar

 keycode  =  percent

 keycode  =  ampersand

 keycode  =  slash braceleft

 keycode  =  parenleft bracketleft

 keycode  =  parenright bracketright

 keycode  = a A

 keycode  = b B

 keycode  = c C

 keycode  = d D

 keycode  = e E EuroSign

 keycode  = f F

 keycode  = g G

 keycode  = h H

 keycode  = i I

 keycode  = j J

 keycode  = k K

 keycode  = l L

 keycode  = m M mu

 keycode  = n N

 keycode  = o O

 keycode  = p P

 keycode  = q Q at

 keycode  = r R

 keycode  = s S

 keycode  = t T

 keycode  = u U

 keycode  = v V

 keycode  = w W

 keycode  = x X

 keycode  = y Y

 keycode  = z Z

 keycode  = KP_ KP_

 keycode  = KP_ KP_

 keycode  = KP_ KP_

 keycode  = KP_ KP_

 keycode  = KP_ KP_

 keycode  = KP_ KP_

 keycode  = KP_ KP_

 keycode  = KP_ KP_

 keycode  = KP_ KP_

 keycode  = KP_ KP_

 keycode  = KP_Multiply KP_Multiply

 keycode  = KP_Add KP_Add

 keycode  = KP_Separator KP_Separator

 keycode  = KP_Subtract KP_Subtract

 keycode  = KP_Decimal KP_Decimal

 keycode  = KP_Divide KP_Divide

 keycode  = F1

 keycode  = F2

 keycode  = F3

 keycode  = F4

 keycode  = F5

 keycode  = F6

 keycode  = F7

 keycode  = F8

 keycode  = F9

 keycode  = F10

 keycode  = F11

 keycode  = F12

 keycode  = F13

 keycode  = F14

 keycode  = F15

 keycode  = F16

 keycode  = F17

 keycode  = F18

 keycode  = F19

 keycode  = F20

 keycode  = F21

 keycode  = F22

 keycode  = F23

 keycode  = F24

 keycode  = Num_Lock

 keycode  = Scroll_Lock

 keycode  = acute grave

 keycode  = comma semicolon

 keycode  = minus underscore

 keycode  = period colon

 keycode  = numbersign apostrophe

 keycode  = plusminus hyphen macron

 keycode  =

 keycode  = copyright registered

 keycode  = guillemotleft guillemotright

 keycode  = masculine ordfeminine

 keycode  = ae AE

 keycode  = cent yen

 keycode  = questiondown exclamdown

 keycode  = onequarter onehalf threequarters

 keycode  = less greater bar

 keycode  = plus asterisk asciitilde

 keycode  = multiply division

 keycode  = acircumflex Acircumflex

 keycode  = ecircumflex Ecircumflex

 keycode  = icircumflex Icircumflex

 keycode  = ocircumflex Ocircumflex

 keycode  = ucircumflex Ucircumflex

 keycode  = ntilde Ntilde

 keycode  = yacute Yacute

 keycode  = oslash Ooblique

 keycode  = aring Aring

 keycode  = ccedilla Ccedilla

 keycode  = thorn THORN

 keycode  = eth ETH

 keycode  = diaeresis cedilla currency

 keycode  = agrave Agrave atilde Atilde

 keycode  = egrave Egrave

 keycode  = igrave Igrave

 keycode  = ograve Ograve otilde Otilde

 keycode  = ugrave Ugrave

 keycode  = adiaeresis Adiaeresis

 keycode  = ediaeresis Ediaeresis

 keycode  = idiaeresis Idiaeresis

 keycode  = odiaeresis Odiaeresis

 keycode  = udiaeresis Udiaeresis

 keycode  = ssharp question backslash

 keycode  = asciicircum degree

 keycode  =  sterling

 keycode  = Mode_switch

 使用event对象的keyCode属性判断输入的键值

 eg:if(event.keyCode==)alert(“enter!”);

 键值对应表

 A  0X65  U   0X85

 B  0X66  V   0X86

 C  0X67  W   0X87

 D  0X68  X   0X88

 E  0X69  Y   0X89

 F  0X70  Z   0X90

 G  0X71     0X48

 H  0X72     0X49

 I   0X73     0X50

 J   0X74     0X51

 K  0X75     0X52

 L  0X76     0X53

 M  0X77     0X54

 N  0X78     0X55

 O  0X79     0X56

 P  0X80     0X57

 Q  0X81 ESC  0X1B

 R  0X82 CTRL  0X11

 S  0X83 SHIFT 0X10

 T  0X84 ENTER 0XD

如果要使用组合键,则可以利用event.ctrlKey,event.shiftKey,event .altKey判断是否按下了ctrl键、shift键以及alt键
04-25 07:30