JS judges the keyboard on the keyboard through the keycode value, then trigger the specified event method

When the button is clicked

 Document.onkeyDown = function; if (e) {e = e ||; if (e .keycode == 13) {// Judgment whether the Enter button (Enter) Document.GtelementByIDX_X_X ("txtid"). Click (); returnaf false;}}   

Keycode’s value represents the key of the corresponding keyboard Keycode 8 = backspace backspace

Keycode 9 = Tab Tab

Keycode 12 = CLEAR
keycode 13 = Enter
keycode 16 = Shift_L
keycode 17 = Control_L
keycode 18 = Alt_L
keycode 19 = Pause
keycode 20 = Caps_Lock
keycode 27 = Escape Escape
Keycode 32 = Space Space
Keycode 33 = prior
Keycode 34 = Next
Keycode 35 = End
Keycode 36 = Home
Keycode 37 = Left
Keycode38 = Up
Keycode 39 = Right
Keycode 41 = SELECT
Keycode 42 = Print
Keycode 43 = Execute
Keycode 45 = INSERT
Keycode 46 = Delete
keycode 47 = Help
keycode 48 = 0 equal braceright
keycode 49 = 1 exclam onesuperior
keycode 50 = 2 quotedbl twosuperior
keycode 51 = 3 section threesuperior
keycode 52 = 4 dollar
keycode 53 = 5 percent
keycode 54 = 6 ampersand
keycode 55 = 7 slash braceleft
keycode 56 = 8 parenleft bracketleft
keycode 57 = 9 parenright bracketright
keycode 65 = a a
Keycode 66 = B B
Keycode 67 = C C
Keycode 68 = D D
Keycode 69 = E E EUROSign
Keycode 70 = f F
Keycode71 = g g
Keycode 72 = h h
Keycode 73 = i i
Keycode 74 = J J
Keycode 75 = K K
Keycode 76 = L L
Keycode 77 = M M Mu
Keycode 78 = N n
Keycode 79 = O O
Keycode 80 = P P
Keycode 81 = Q q AT
Keycode 82 = R R
Keycode 83 = S S
Keycode 84 = T T
Keycode 85 = u u
Keycode 86 = V
Keycode 87 = W W
Keycode 88 = x
Keycode 89 = y y y y y y y y y y y y y y y y y y y y y y y y ybe
Keycode 90 = z z
Keycode 96 = KP_0 KP_0
Keycode 97 = KP_1 KP_1
Keycode 98 = KP_2 KP_2
Keycode 99 = KP_3 KP_3
KeyCode 100 = KP_4 KP_4
Keycode 101 = KP_5 KP_5
Keycode 102 = KP_6 KP_6
Keycode 103 = KP_7 KP_7
Keycode 104 = KP_8 KP_8
Keycode 105 = KP_9 KP_9
KeycoDe 106 = KP_Multiply KP_Multiply
keycode 107 = KP_Add KP_Add
keycode 108 = KP_Separator KP_Separator
keycode 109 = KP_Subtract KP_Subtract
keycode 110 = KP_Decimal KP_Decimal
keycode 111 = KP_Divide KP_Divide
keycode 112 = F1
Keycode 113 = f2
Keycode 114 = F3
Keycode 115 = f4
Keycode 116 = F5
Keycode 117 = F6
Keycode 118 = F7
Keycode 119 = F8
Keycode 120 = F9
Keycode 121 = F10
Keycode 122 = F11
Keycode 123 = F12
Keycode 124 = F13
Keycode 125 = F14
KeyCode 126 = F15
Keycode 127 = F16
Keycode 128 = F17
Keycode 129 = F18
Keycode 130 = f19
Keycode 131 = F20
Keycode 132 = F21
Keycode 133 = F22
Keycode 134 = F23
Keycode 135 = F24
Keycode 136 = Num_Lock
keycode 137 = Scroll_Lock
keycode 187 = acute grave
keycode 188 = comma semicolon
keycode 189 = minus underscore
keycode 190 = period colon
keycode 192 = numbersign apostrophe
keycode 210 = plusminus hyphen macron
keycode 211 =
keycode 212 = copyright registered
keycode 213 = guillemotleft guillemotright
keycode 214 = masculine ordfeminine
keycode 215 = ae AE
keycode 216 = cent yen
keycode 217 = questiondown exclamdown
keycode 218 = onequarter onehalf threequarters
keycode 220 = less greater bar
keycode 221 = plus asterisk asciitilde
keycode 227 = multiply division
keycode 228 = Acircumflex Acircumflex
Keycode 229 = Ecircumflex Ecircumflex
Keycode 230 = icrcumflex iCircumflex
keycode 231 = ocircumflex Ocircumflex
keycode 232 = ucircumflex Ucircumflex
keycode 233 = ntilde Ntilde
keycode 234 = yacute Yacute
keycode 235 = oslash Ooblique
keycode 236 = aring Aring
keycode 237 = ccedilla Ccedilla
keycode 238 = thorn THORN
keycode 239 = eth ETH
keycode 240 = diaeresis cedilla currency
keycode 241 = agrave agrave atilde atilde
keycode 242 = egrave Egrave
keycode 243 = igrave Igrave
keycode 244 = ograve Ograve otilde Otilde
keycode 245 = ugrave Ugrave
keycode 246 = adiaeresis Adiaeresis
keycode 247 = ediaeresis Ediaeresis
keycode 248 = idiaeresis Idiaeresis
keycode 249 = Odiaresis Odiaresis
Keycode 250 = udiaresis udiaresis
Keycode 251 = SSHARP Question Backslash
Keycode 252 = ASCIICIRCUM Degree
Keycode 253 = 3 Sterling
Keycode 254 = MODE_SWITCH


To determine a key on the keyboard through the keycode value, then trigger the specified The event method is the full content of Xiaobian sharing to everyone, I hope to give you a reference, I hope everyone will support Tumi Cloud.

© Copyright Notice
THE END
Just support it if you like
like0
share
comment Grab the couch

Please log in to comment