1. Keyboard events should be added to window unified provisioning and the trigger status is determined according to category_hand.
2. Put it in the function and execute it after the page is loaded.
1. "Keyboard events should be added to window unified provisioning, and the state detection and processing should be detected according to category_hand" is the strategy to implement your sentence:
"When the scroll bar is clicked, the up and down keys of the keyboard are triggered to control the up and down scrolling"
When category_hand is clicked, set a variable to 1 to indicate that it is activated. When the mouse button event occurs again on the web page, deactivate.
A function responds to a keyboard event of a window object. If category_hand is activated when the keyboard event occurs, the relevant code will be executed.
2. Get page element object. Now everyone usually uses the $() function:
Copy the codeThe code is as follows:
function $(id) {
return (id);
}
Previous page12Read the full text