js中window.event.keyCode!=8什么意思?
答案:3 悬赏:20 手机版
解决时间 2021-02-19 22:37
- 提问者网友:川水往事
- 2021-02-19 02:32
js中window.event.keyCode!=8什么意思?
最佳答案
- 五星知识达人网友:一秋
- 2021-02-19 03:10
如果文本域里的字数多于199个的时候,就只能按BackSpace 键,否则键盘输不进内容,就是到达了199个数字打不进去了,只能删除一些数字再打了!
全部回答
- 1楼网友:孤独入客枕
- 2021-02-19 04:45
判断事件按下的是否为 backspace 键
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
76 keycode 108 = kp_separator kp_separator
77 keycode 109 = kp_subtract kp_subtract
78 keycode 110 = kp_decimal kp_decimal
79 keycode 如果没按BackSpace 键
- 2楼网友:廢物販賣機
- 2021-02-19 03:41
当你在 id="txt" 文本域中输入文字时,如果长度大于199.而且你接下的输入的不是退格键。那么文本域不接收你的输入。
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯