Javascript的keycode大全


JavaScript #keycode2012-07-21 11:31

今天收藏来的。

001keycode    8 = BackSpace BackSpace
002keycode    9 = Tab Tab
003keycode   12 = Clear
004keycode   13 = Enter
005keycode   16 = Shift_L
006keycode   17 = Control_L
007keycode   18 = Alt_L
008keycode   19 = Pause
009keycode   20 = Caps_Lock
010keycode   27 = Escape Escape
011keycode   32 = space space
012keycode   33 = Prior
013keycode   34 = Next
014keycode   35 = End
015keycode   36 = Home
016keycode   37 = Left
017keycode   38 = Up
018keycode   39 = Right
019keycode   40 = Down
020keycode   41 = Select
021keycode   42 = Print
022keycode   43 = Execute
023keycode   45 = Insert
024keycode   46 = Delete
025keycode   47 = Help
026keycode   48 = 0 equal braceright
027keycode   49 = 1 exclam onesuperior
028keycode   50 = 2 quotedbl twosuperior
029keycode   51 = 3 section threesuperior
030keycode   52 = 4 dollar
031keycode   53 = 5 percent
032keycode   54 = 6 ampersand
033keycode   55 = 7 slash braceleft
034keycode   56 = 8 parenleft bracketleft
035keycode   57 = 9 parenright bracketright
036keycode   65 = a A
037keycode   66 = b B
038keycode   67 = c C
039keycode   68 = d D
040keycode   69 = e E EuroSign
041keycode   70 = f F
042keycode   71 = g G
043keycode   72 = h H
044keycode   73 = i I
045keycode   74 = j J
046keycode   75 = k K
047keycode   76 = l L
048keycode   77 = m M mu
049keycode   78 = n N
050keycode   79 = o O
051keycode   80 = p P
052keycode   81 = q Q at
053keycode   82 = r R
054keycode   83 = s S
055keycode   84 = t T
056keycode   85 = u U
057keycode   86 = v V
058keycode   87 = w W
059keycode   88 = x X
060keycode   89 = y Y
061keycode   90 = z Z
062keycode   96 = KP_0 KP_0
063keycode   97 = KP_1 KP_1
064keycode   98 = KP_2 KP_2
065keycode   99 = KP_3 KP_3
066keycode 100 = KP_4 KP_4
067keycode 101 = KP_5 KP_5
068keycode 102 = KP_6 KP_6
069keycode 103 = KP_7 KP_7
070keycode 104 = KP_8 KP_8
071keycode 105 = KP_9 KP_9
072keycode 106 = KP_Multiply KP_Multiply
073keycode 107 = KP_Add KP_Add
074keycode 108 = KP_Separator KP_Separator
075keycode 109 = KP_Subtract KP_Subtract
076keycode 110 = KP_Decimal KP_Decimal
077keycode 111 = KP_Divide KP_Divide
078keycode 112 = F1
079keycode 113 = F2
080keycode 114 = F3
081keycode 115 = F4
082keycode 116 = F5
083keycode 117 = F6
084keycode 118 = F7
085keycode 119 = F8
086keycode 120 = F9
087keycode 121 = F10
088keycode 122 = F11
089keycode 123 = F12
090keycode 124 = F13
091keycode 125 = F14
092keycode 126 = F15
093keycode 127 = F16
094keycode 128 = F17
095keycode 129 = F18
096keycode 130 = F19
097keycode 131 = F20
098keycode 132 = F21
099keycode 133 = F22
100keycode 134 = F23
101keycode 135 = F24
102keycode 136 = Num_Lock
103keycode 137 = Scroll_Lock
104keycode 187 = acute grave
105keycode 188 = comma semicolon
106keycode 189 = minus underscore
107keycode 190 = period colon
108keycode 192 = numbersign apostrophe
109keycode 210 = plusminus hyphen macron
110keycode 211 =
111keycode 212 = copyright registered
112keycode 213 = guillemotleft guillemotright
113keycode 214 = masculine ordfeminine
114keycode 215 = ae AE
115keycode 216 = cent yen
116keycode 217 = questiondown exclamdown
117keycode 218 = onequarter onehalf threequarters
118keycode 220 = less greater bar
119keycode 221 = plus asterisk asciitilde
120keycode 227 = multiply division
121keycode 228 = acircumflex Acircumflex
122keycode 229 = ecircumflex Ecircumflex
123keycode 230 = icircumflex Icircumflex
124keycode 231 = ocircumflex Ocircumflex
125keycode 232 = ucircumflex Ucircumflex
126keycode 233 = ntilde Ntilde
127keycode 234 = yacute Yacute
128keycode 235 = oslash Ooblique
129keycode 236 = aring Aring
130keycode 237 = ccedilla Ccedilla
131keycode 238 = thorn THORN
132keycode 239 = eth ETH
133keycode 240 = diaeresis cedilla currency
134keycode 241 = agrave Agrave atilde Atilde
135keycode 242 = egrave Egrave
136keycode 243 = igrave Igrave
137keycode 244 = ograve Ograve otilde Otilde
138keycode 245 = ugrave Ugrave
139keycode 246 = adiaeresis Adiaeresis
140keycode 247 = ediaeresis Ediaeresis
141keycode 248 = idiaeresis Idiaeresis
142keycode 249 = odiaeresis Odiaeresis
143keycode 250 = udiaeresis Udiaeresis
144keycode 251 = ssharp question backslash
145keycode 252 = asciicircum degree
146keycode 253 = 3 sterling
147keycode 254 = Mode_switch
使用示例:

1function keyevent(){
2     if(event.keyCode==13)
3     alert("http://yige.org");
4}
5 
6document.onkeydown = keyevent;


相关文章

粤ICP备11097351号-1