码迷,mamicode.com
首页 > Windows程序 > 详细

window.onscroll事件 谷歌兼容性问题

时间:2015-08-10 10:42:36      阅读:236      评论:0      收藏:0      [点我收藏+]

标签:js   html   谷歌   

直接贴代码

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";
	}
	 
}


版权声明:本文为博主原创文章,未经博主允许不得转载。

window.onscroll事件 谷歌兼容性问题

标签:js   html   谷歌   

原文地址:http://blog.csdn.net/qq_19524879/article/details/47393859

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!