首頁 >web前端 >js教程 >JS鍵盤的鍵碼(event.keyCode)圖片版_基礎知識

JS鍵盤的鍵碼(event.keyCode)圖片版_基礎知識

WBOY
WBOY原創
2016-05-16 17:43:171100瀏覽

圖片版:點擊看大圖
JS鍵盤的鍵碼(event.keyCode)圖片版_基礎知識

網路上收集的KeyCode值方便大家找:

keycode 8 = BackSpaceSpaceSpace
>🎜>
keycode 8 = BackSpaceSpaceSpace
keykeycode 9 = Tab Tab
鍵碼12 = 清除
鍵碼13 = 輸入
鍵碼16 = Shift_L
鍵碼17 = Control_L
鍵碼18 = Alt_L
鍵碼19 =暫停
鍵碼20 = Caps_Lock
鍵碼27 = Escape Escape
鍵碼32 = 空格
鍵碼33 = 前一個
鍵碼34 = 下一個
鍵碼35 = 結束
鍵碼36 = 首頁
鍵碼37 = 向左
鍵碼38 = 向上
鍵碼39 = 向右
鍵碼40 = 向下
鍵碼41 = 選擇
鍵碼42 = 列印
鍵碼43 = 執行
鍵碼45 = 插入
鍵碼46 = 刪除
鍵碼47 = 幫助
鍵碼48 = 0 等號右括號
鍵碼49 = 1 感嘆號onesuperior
鍵碼50 = 2 引用bl 二上級
鍵碼51 = 3第三部分上級
鍵碼52 = 4 美元
鍵碼53 = 5%
鍵碼54 = 6 與符號
鍵碼55 = 7 斜線左括號
鍵碼56 = 8 左括號
鍵碼57 = 9 paren括號右
鍵碼65 = a A
鍵碼66 = b B
鍵碼67 = c C
鍵碼68 = d D
鍵碼69 = e E EuroSign
鍵碼70 = f F
鍵碼71 = g G
鍵碼72 = h H
鍵碼73 = i I
鍵碼74 = j J
鍵碼75 = k K
鍵碼76 = l L
鍵碼77 = m M mu
鍵碼78 = n N
鍵碼79 = o O
鍵碼80 = p P
鍵碼81 = q Q at
鍵碼82 = r R
鍵碼83 = s S
鍵碼84 = t T
鍵碼85 = u U
鍵碼86 = v V
鍵碼87 = w W
鍵碼88 = x X
鍵碼89 = y Y
鍵碼90 = z Z
鍵碼96 = KP_0 KP_0
鍵97 = KP_1 KP_1
鍵碼98 = KP_2 KP_2
鍵碼99 = KP_3 KP_3
鍵碼100 = KP_4 KP_4
鍵碼101 = KP_5 KP_5 鍵碼103 = KP_7 KP_7
鍵碼104 = KP_8 KP_8
鍵碼105 = KP_9 KP_9
鍵碼106 = KP_Multiply KP_Multiply AddP>M 108 = KP_Separator KP_Separator
鍵碼109 = KP_Subtract KP_Subtract
鍵碼110 = KP_Decimal KP_Decimal
鍵碼111 = KP_D ivivion KP_Decimal
鍵碼111 = KP_D ivivion KP_Divv 🎜 >鍵碼114 = F3
鍵碼115 = F4
鍵碼116 = F5
鍵碼117 = F6
鍵碼118 = F7
鍵碼119 = F8
鍵碼118 = F7
鍵碼119 = F8
鍵鍵碼120 = F9
鍵碼121 = F10
鍵碼122 = F11
鍵碼123 = F12
鍵碼124 = F13
鍵碼125 = F14
鍵碼126 = F15
鍵碼127 = F16
鍵碼128 = F17
鍵碼129 = F18
鍵碼130 = F19
鍵碼131 = F20
鍵碼132 = F2
鍵碼133 = F22
鍵碼134 = F23
鍵碼135 = F24
鍵碼136 = Num_Lock
鍵碼137 = Scroll_Lock
鍵碼187 = 急性墳墓> 🎜>鍵碼188 = 逗號分號
鍵碼189 = 減劃線
鍵碼190 = 句點冒號
鍵碼192 = 數字撇號
鍵碼210 = 加號連宏字元
鍵碼211 =
鍵碼212 = 已註冊版權
鍵碼213 = guillemotleft guillemotright
鍵碼214 = 男性或女性
鍵碼215 = ae AE
鍵碼= 分日元
鍵碼217 = Questiondown 感嘆號
鍵碼218 = 四分之一四分之一四分之三
鍵碼220 = 較小的大條
鍵碼221 = 加星號asciitilde
鍵碼227 = 乘除
鍵碼228 = acircumflex Acircumflex
鍵碼229 = ecircumflex Ecircumflex
🎜>鍵碼232 = ucircumflex Ucircumflex
keycode 233 = ntilde Ntilde
keycode 234 = yacute Yacute
keycode 235 = oslash Ooblique keycode 238 = thorn THORN
鍵碼239 = eth ETH
鍵碼240 = 分音符塞迪拉貨幣
鍵碼241 = agrave Agrave atilde Atilde
鍵碼242 = egrave Egrave🎟 >鍵碼243 = igrave Igrave
鍵碼244 = ograve Ograve otilde Otilde
鍵碼245 = ugrave Ugrave
鍵碼246 = diaeresis Adiaeresis 鍵碼248 = idiaeres Idiaeres
鍵碼249 = diaeresis Odiaeres
密鑰代碼250 = udiaeresis Udiaeresis
鍵碼251 = ssharp 問題反斜碼鍵碼254 = Mode_switch
使用

event.keyCode值為37﹐38﹐39﹐40對應按下的方向鍵分別是左﹐上﹐右﹐下

"javascript:if (event.keyCode 57) event.returnValue = false;");

if(event.keycode==13)代表按下的是回車鍵盤

"javascript:if (event.keyCode > 45 && event.keyCode


[Ctrl A 全選 註:如需引入外部Js需刷新才能執行
]

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn