首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

jquery 弹出层正中设置

2012-07-25 
jquery 弹出层居中设置var iWidth document.documentElement.clientWidthvar iHeight document.docum

jquery 弹出层居中设置

var iWidth = document.documentElement.clientWidth;var iHeight = document.documentElement.clientHeight;var scrollHeight = document.documentElement.scrollTop;//文档卷去高度var oShow = document.getElementById('show');oShow.style.left = (iWidth-oShow.offsetWidth)/2+"px";oShow.style.top = (iHeight-oShow.offsetHeight)/2+scrollHeight+"px";

热点排行