window.event.keycode值大全

event.keycode值大全

1 keycode 8 = BackSpace BackSpace

2 keycode 9 = Tab Tab

3 keycode 12 = Clear

4 keycode 13 = Enter

5 keycode 16 = Shift_L

6 keycode 17 = Control_L

7 keycode 18 = Alt_L

8 keycode 19 = Pause

9 keycode 20 = Caps_Lock

10 keycode 27 = Escape Escape

11 keycode 32 = space space

12 keycode 33 = Prior

13 keycode 34 = Next

14 keycode 35 = End

15 keycode 36 = Home

16 keycode 37 = Left

17 keycode 38 = Up

18 keycode 39 = Right

19 keycode 40 = Down

20 keycode 41 = Select

21 keycode 42 = Print

22 keycode 43 = Execute

23 keycode 45 = Insert

24 keycode 46 = Delete

25 keycode 47 = Help

26 keycode 48 = 0 equal braceright

27 keycode 49 = 1 exclam onesuperior

28 keycode 50 = 2 quotedbl twosuperior

29 keycode 51 = 3 section threesuperior

30 keycode 52 = 4 dollar

31 keycode 53 = 5 percent

32 keycode 54 = 6 ampersand

33 keycode 55 = 7 slash braceleft

34 keycode 56 = 8 parenleft bracketleft

35 keycode 57 = 9 parenright bracketright

36 keycode 65 = a A

37 keycode 66 = b B

38 keycode 67 = c C

39 keycode 68 = d D

40 keycode 69 = e E EuroSign

41 keycode 70 = f F

42

43 keycode 71 = g G

44 keycode 72 = h H

45 keycode 73 = i I

46 keycode 74 = j J

47 keycode 75 = k K

48 keycode 76 = l L

49 keycode 77 = m M mu

50 keycode 78 = n N

51 keycode 79 = o O

52 keycode 80 = p P

53 keycode 81 = q Q at

54 keycode 82 = r R

55 keycode 83 = s S

56 keycode 84 = t T

57 keycode 85 = u U

58 keycode 86 = v V

59 keycode 87 = w W

60 keycode 88 = x X

61 keycode 89 = y Y

62 keycode 90 = z Z

63 keycode 96 = KP_0 KP_0

64 keycode 97 = KP_1 KP_1

65 keycode 98 = KP_2 KP_2

66 keycode 99 = KP_3 KP_3

67 keycode 100 = KP_4 KP_4

68 keycode 101 = KP_5 KP_5

69 keycode 102 = KP_6 KP_6

70 keycode 103 = KP_7 KP_7

71 keycode 104 = KP_8 KP_8

72 keycode 105 = KP_9 KP_9

73 keycode 106 = KP_Multiply KP_Multiply

74 keycode 107 = KP_Add KP_Add

75

76 keycode 108 = KP_Separator KP_Separator

77 keycode 109 = KP_Subtract KP_Subtract

78 keycode 110 = KP_Decimal KP_Decimal

79 keycode 111 = KP_Divide KP_Divide

80 keycode 112 = F1

81 keycode 113 = F2

82 keycode 114 = F3

83 keycode 115 = F4

84

85

86 keycode 116 = F5

87 keycode 117 = F6

88 keycode 118 = F7

89 keycode 119 = F8

90 keycode 120 = F9

91 keycode 121 = F10

92 keycode 122 = F11

93 keycode 123 = F12

94 keycode 124 = F13

95 keycode 125 = F14

96 keycode 126 = F15

97 keycode 127 = F16

98 keycode 128 = F17

99 keycode 129 = F18

100 keycode 130 = F19

101 keycode 131 = F20

102 keycode 132 = F21

103 keycode 133 = F22

104 keycode 134 = F23

105 keycode 135 = F24

106 keycode 136 = Num_Lock

107 keycode 137 = Scroll_Lock

108 keycode 187 = acute grave

109 keycode 188 = comma semicolon

110 keycode 189 = minus underscore

111 keycode 190 = period colon

112 keycode 192 = numbersign apostrophe

113 keycode 210 = plusminus hyphen macron

114 keycode 211 =

115 keycode 212 = copyright registered

116 keycode 213 = guillemotleft guillemotright

117 keycode 214 = masculine ordfeminine

118 keycode 215 = ae AE

119 keycode 216 = cent yen

120 keycode 217 = questiondown exclamdown

121 keycode 218 = onequarter onehalf threequarters

122 keycode 220 = less greater bar

123 keycode 221 = plus asterisk asciitilde

124 keycode 227 = multiply division

125

126 keycode 228 = acircumflex Acircumflex

127 keycode 229 = ecircumflex Ecircumflex

128 keycode 230 = icircumflex Icircumflex

129 keycode 231 = ocircumflex Ocircumflex

130 keycode 232 = ucircumflex Ucircumflex

131 keycode 233 = ntilde Ntilde

132 keycode 234 = yacute Yacute

133 keycode 235 = oslash Ooblique

134 keycode 236 = aring Aring

135 keycode 237 = ccedilla Ccedilla

136 keycode 238 = thorn THORN

137 keycode 239 = eth ETH

138 keycode 240 = diaeresis cedilla currency

139 keycode 241 = agrave Agrave atilde Atilde

140 keycode 242 = egrave Egrave

141 keycode 243 = igrave Igrave

142 keycode 244 = ograve Ograve otilde Otilde

143 keycode 245 = ugrave Ugrave

144 keycode 246 = adiaeresis Adiaeresis

145 keycode 247 = ediaeresis Ediaeresis

146 keycode 248 = idiaeresis Idiaeresis

147 keycode 249 = odiaeresis Odiaeresis

148 keycode 250 = udiaeresis Udiaeresis

149 keycode 251 = ssharp question backslash

150 keycode 252 = asciicircum degree

151 keycode 253 = 3 sterling

152 keycode 254 = Mode_switch

153

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

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

156 键值对应表

157 A  0X65  U   0X85

158 B  0X66  V   0X86

159 C  0X67  W   0X87

160 D  0X68  X   0X88

161 E  0X69  Y   0X89

162 F  0X70  Z   0X90

163 G  0X71  0   0X48

164 H  0X72  1   0X49

165 I   0X73  2   0X50

166 J   0X74  3   0X51

167 K  0X75  4   0X52

168 L  0X76  5   0X53

169 M  0X77  6   0X54

170 N  0X78  7   0X55

171 O  0X79  8   0X56

172 P  0X80  9   0X57

173 Q  0X81 ESC  0X1B

174 R  0X82 CTRL  0X11

175 S  0X83 SHIFT 0X10

176 T  0X84 ENTER 0XD

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

function myKeyDown() {
        var k = window.event.keyCode;
        if ((k == 46) || (k == 8) || (k == 189) || (k == 109) || (k == 110) || (k >= 48 && k <= 57) || (k >= 96 && k <= 105) || (k >= 37 && k <= 40))
        { }
        else if (k == 13) {
            window.event.keyCode = 9;
        }
        else {
            window.event.returnValue = false;
        }

window.event.keycode值大全的更多相关文章

  1. event.keycode值大全

    window.event.keycode-获取按下的键盘值   event.keycode值大全1 keycode 8 = BackSpace BackSpace 2 keycode 9 = Tab ...

  2. ASP.NET使用window.event.keycode来获取按下的键盘值!

    window.event.keycode-获取按下的键盘值 这里只列出了一些较常用的键盘值更加详细的键盘值请访问此人博客:https://www.cnblogs.com/z-sm/p/3597592. ...

  3. 键盘对应数字-keycode值大全(转)

    event.keycode值大全   keycode 8 = BackSpace BackSpace    keycode 9 = Tab Tab    keycode 12 = Clear    k ...

  4. JavaScript 键盘event.keyCode值列表大全

      JavaScript 键盘event.keyCode值列表大全   event.keyCode值列表大全,对于需要根据键盘按键触发相应事件的朋友需要. 网上收集的KeyCode值方便大家查找: k ...

  5. JS控制键盘录入 和 window.event.keycode对照

    一.只允许录入整数 1.不允许录入非数字(按下字母键就会提示并清空) function intOnly() { if (!(window.event.keyCode >= 48 &&am ...

  6. Window.Event.KeyCode的含义

    Window.Event.KeyCode=13的含义(转载) 2011-04-16 09:41:18|  分类: html |  标签:keycode  event  realkey  var  do ...

  7. Window.Event.KeyCode=13

    Window.Event.KeyCode=13是enter键处发windows事件,enter键的ASCII是13. <input type="password" name= ...

  8. Javascript中的window.event.keyCode使用介绍

    <body onkeydown=" alert(window.event.keyCode)"> <body onkeydown="if(window.e ...

  9. js_event.keycode值大全

    onkeydown 当用户按下键盘按键时触发onkeypress   当用户按下字面键时触发 onkeyup  当用户释放键盘按键时触发 =============================== ...

随机推荐

  1. 微信小程序-page

    一 什么是page() page(),是一个函数,用来注册一个页面, 接受一个object参数, 指定页面的初始数据,生命周期函数,事件处理函数 等等 object参数说明: (1)data (obj ...

  2. js利用时间戳动态显示系统时间距指定时间的时间差

    function dateTimes(times) { var d = new Date(times * 1000); var date = (d.getFullYear()) + "-&q ...

  3. 基于nginx的token认证

    Nginx 的 token 认证是基于集成了 nginx+lua 的 openresty 来实现的. 环境: centos 7 部署方式: 增量部署(不影响原 nginx 版本) 版本: openre ...

  4. RNN与BPTT (公式甚多)

    前言: 现在深度学习是一个潮流,同时,导师也给自己制定了深度学习的方向.在一次组会中,自己讲解了RNN的基本用法,和RNN数学原理的推导.以下是自己根据当时的PPT总结下来的东西.

  5. js漂亮的弹出层

    1.漂亮的弹出层----artDialog http://aui.github.io/artDialog/ 2.弹出层 ------layer http://sentsin.com/jquery/la ...

  6. OpenWrt 安装usb支持

    (一)下载软件 1)komd-usb-ohci kmod-usb2 kmod-usb-storage kmod-usb-core 这些是USB驱动包 2) kmod-nls-base kmod-nls ...

  7. hdu3665-Seaside(SPFA,dijkstra,floyd)

    Seaside Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Su ...

  8. python uwsgi 部署以及优化

    这篇文章其实两个月之前就应该面世了,但是最近琐事.烦心事太多就一直懒得动笔,拖到现在才写 一.uwsgi.wsgi.fastcgi区别和联系 参见之前的文章 http://www.cnblogs.co ...

  9. Mysql event时间触发器,实现定时修改某些符合某一条件的某一字段

    我最近做项目遇到一个问题就是数据库的的订单需要定时检查自己的订单状态,如果到了endtime字段的时间订单状态还是2,就将订单状态修改为4 在网上找到类似的解决方法. 定时的关键是要结合mysql的某 ...

  10. oracle 网络访问配置tnsnames.ora文件的路径

    转自:https://blog.csdn.net/jaray/article/details/22379811 oracle 网络访问配置tnsnames.ora文件的路径 oracle 9i  是: ...