复制代码 代码如下:
functiontest(){
varinfoHeight=document.getElementById("info").scrollHeight;
varbottomHeight=document.getElementById("bottom").scrollHeight;
varallHeight=document.documentElement.clientHeight;
varbottom=document.getElementById("bottom");
if((infoHeight+bottomHeight)
bottom.style.bottom="0";
}else{
bottom.style.position="";
bottom.style.bottom="";
}
setTimeout(function(){test();},10);
}
test();
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]