/**
You can control the data by yourself and set the specific meaning of the key.
*/
VaR currentpage = 1;
Function pageresult (PAGE ){
VaR Weight = 0;
VaR Height = 0;
// You can locate the horizontal display position.
// Var setweight = Document. Body. scrollheight/totlenum;
// Locate the direct direction of the tree and display data on several screens
// The size of each screen (availheight and availwidth are displayed based on the size of the screen)
VaR screenheight = Window. Screen. availheight;
// Display several screens (scrollwidth and scrollheight)
VaR setheight = Document. Body. scrollheight/screenheight; // (only supported after IE6)
// Var setheight=document.doc umentelement. scrollheight/screenheight; // different browsers are displayed.
// Yes, but there must be a uniform ID body.
// Var setheight = Document. getelementbyid ("body"). scrollheight/screenheight;
// Press the upper and lower right parts (2, 8, 4, 6)
// Flip the screen up and press the keyboard key of the phone 2 or press the Arrow
If (event. keycode = 38 | event. keycode = 104 ){
If (currentpage> 0 ){
Currentpage --;
}
Height = screenheight * currentpage;
}
// Flip down the screen and press the keyboard of the phone 8 or down the Arrow
If (event. keycode = 40 | event. keycode = 98 ){
If (currentpage <= setheight ){
Currentpage ++;
}
Height = screenheight * currentpage;
}
// Return to start 4 or left
If (event. keycode = 37 | event. keycode = 100 ){
Height = 0;
}
// End by arrow right or by 6
If (event. keycode = 39 | event. keycode = 102 ){
// Height = Document. getelementbyid ("body"). scrollheight;
Height = Document. Body. scrollheight;
// Height1_document.doc umentelement. scrollheight;
Alert (height );
}
If (event. keycode = 13 ){
Window. Location. href = "http://www.baidu.com ";
}
Window. scrollto (0, height );
}
// Load events by default after JS is imported
Required parameter Doc ument. onkeydown = pageresult;