直接贴代码
window.onscroll=function(){
var scroHeight=document.documentElement.scrollTop||document.body.scrollTop;
if(scroHeight >= 119 ){
document.getElementById("cd").className="table1";
}else{
document.getElementById("cd").className="table";
}
}版权声明:本文为博主原创文章,未经博主允许不得转载。
原文地址:http://blog.csdn.net/qq_19524879/article/details/47393859