var currentPosition,timer;
function GoBottom(){
timer=setInterval("runToBottom()",50);
}
函數 runToBottom(){
currentPosition=document.documentElement.scrollTop ||文檔.body.scrollTop;
目前位置 =30;
if(currentPosition{
//window.scrollTo(0,currentosition) ;
//alert(document.documentElement.clientHeight " " document.documentElement.scrollTop " " document.documentElement.scrollHeight "#" document.body.clientHeight " " document.body.scrollTop "#" document.body.clientHeight " " document.body.scrollTop "" document.body.
document.body.scrollTop = currentPosition;
}
其他
{
document.body.scrollTop = document.body.scrollHeight;
clearInterval(計時器);
}
}