网上收集的KeyCode值方便大家查找: keycode 8 = BackSpace BackSpace keycode 9 = 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 = 0 equal braceright keycode = 1 exclam onesuperior keycode = 2 quotedbl twosuperior keycode = 3 section threesuperior keycode = 4 dollar keycode = 5 percent keycode = 6 ampersand keycode = 7 slash braceleft keycode = 8 parenleft bracketleft keycode = 9 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_0 KP_0 keycode = KP_1 KP_1 keycode = KP_2 KP_2 keycode = KP_3 KP_3 keycode = KP_4 KP_4 keycode = KP_5 KP_5 keycode = KP_6 KP_6 keycode = KP_7 KP_7 keycode = KP_8 KP_8 keycode = KP_9 KP_9 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 = F keycode = F keycode = F keycode = F keycode = F keycode = F keycode = F keycode = F keycode = F keycode = F keycode = F keycode = F keycode = F keycode = F keycode = F 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 = 3 sterling keycode = Mode_switch 使用 <script language="javascript"> function keyevent(){ if(event.keyCode==) alert("#$%#%#^^%"); } document.onkeydown = keyevent; </script> event.keyCode值??7??????聪碌姆较蜴I分?e是 左?上?右?下 "javascript:if (event.keyCode < || event.keyCode > ) event.returnValue = false;"); if(event.keycode==)就代表按下的是回车键盘 "javascript:if (event.keyCode > && event.keyCode < ) event.returnValue = false;"); //Javascript Document 请按任意一个键。。。。 [Ctrl+A 全选 注:如需引入外部Js需刷新才能执行] ********************************************************************** 使用javascript在WEB页面中截获键盘输入 ??使用event对象的keyCode属性判断输入的键值 ??eg:if(event.keyCode==)alert(“enter!”); ??键值对应表 ??A 0X U 0X ??B 0X V 0X ??C 0X W 0X ??D 0X X 0X ??E 0X Y 0X ??F 0X Z 0X ??G 0X 0 0X ??H 0X 1 0X ??I 0X 2 0X ??J 0X 3 0X ??K 0X 4 0X ??L 0X 5 0X ??M 0X 6 0X ??N 0X 7 0X ??O 0X 8 0X ??P 0X 9 0X ??Q 0X ESC 0X1B ??R 0X CTRL 0X ??S 0X SHIFT 0X ??T 0X ENTER 0XD ?? ??如果要使用组合键,则可以利用event.ctrlKey,event.shiftKey,event .altKey判断是否按下了ctrl键、shift键以及alt键
推荐整理分享JavaScript 键盘event.keyCode值列表大全(js键盘事件有哪些?各自的作用如何),希望有所帮助,仅作参考,欢迎阅读内容。
文章相关热门搜索词:js键盘事件有哪些,js键盘事件有哪些,js调起键盘,js实现键盘按下win键,javascript 键盘控制,javascript 键盘输入,javascript 键盘控制,javascript 键盘输入,内容如对您有帮助,希望把文章链接给更多的朋友!
JavaScript中关于indexOf的使用方法与问题小结 这个方法相当有用,很多编程语言中都有相对应的实现,javascript中也不例外,然而当我在ie中运行如下代码时候:vararr=[1,2,3];alert(arr.indexOf(1));却被提示
JavaScript学习历程和心得小结 一、前言在过去,JavaScript只是被用来做一些简单的网页效果,比如表单验证、浮动广告等,所以那时候JavaScript并没有受到重视。自从AJAX开始流行后,
JavaScript开发规范要求(规范化代码) 本人在开发工作中就曾与不按规范来开发的同事合作过,与他合作就不能用愉快来形容了。现在本人撰写此文的目的除了与大家分享一点点经验外,更