Shortcut keys in the daily use is still quite a lot of, for example, familiar paste Ctrl + V, copy Ctrl + C, use shortcut keys to improve our efficiency, especially when we are familiar with an operation, it will become very convenient to use it again, very handy, for the use of the keyboard heavy users, The keyboard is always faster than the mouse.
1) TabIndex:
is to use the tab to easily control the links and form elements in the page
Its usage is very simple: Obj.tabindex = TabIndex; The value of this tabindex, according to the rules of the consortium can start from 0 to 32767
2 JS set combination shortcut key
The essence is to get the value of the keycode of the key you want to set, and if you want to add a ctrl,alt,shift, then a ctrlkey,altkey,shiftkey is added to judge, so the key is the KeyCode value
(1) Set CTRL +enter Submit
if (e.ctrlkey && e.keycode = 13) {
return submit ();
}
(2) Set ALT + Direction key ←
if (e.altkey&& E.keycode = = 37) {
return submit ();
}
(3) Set SHIFT+F10
if (e.shiftkey&& E.keycode = = 37) {
return submit ();
}
4) Set EN
ter submit
if (E.keycode = = 13) {
return submit ();
}
There are some common shortcut keys attached here:
keycode 8 = BackSpace BackSpace
keycode 9 = tab TAB
keycode = Clear
keycode = Enter
keycode = shift_l
keycode & nbsp control_l
keycode = alt_l
keycode = Pause
keycode = caps_lock< br>keycode = Escape escape
keycode = space spaces
keycode = Prior
Ke ycode = Next
keycode = end
keycode = home
keycode Panax Notoginseng = L EFT
keycode = up
keycode -right
keycode = down
keycode & nbsp Select
keycode = Print
keycode = Execute
keycode = Insert
K eycode = Delete
keycode = Help
Note: Browser compatibility issues