function aa() {
var height = document.body.clientHeight;
var number = 0; //控制结束累加器
var length = 0; //控制每次翻滚长度
var frequency = 120; //控制总时间
var time = setInterval(function(){
number += 1;
if(number == frequency + 1){
clearInterval(time);
} else {
length += height / frequency;
document.documentElement.scrollTop = length;
}
},1000); //每隔1S翻滚
}
function ab() {
test.height = document.body.clientHeight;
var number = 0;
var length = 0;
var time = setInterval(function(){
number += 1;
if(number == 121){
clearInterval(time);
} else {
length += test.height / 120;
$(document).scrollTop(length); //只有此处有区别
}
},1000);
}
console