JQ与屏幕等高

时间:2015-01-13 12:04:33   收藏:0   阅读:306

<script type="text/javascript">
$(function()
{
var h = document.documentElement.clientHeight;//获取页面可见高度
$(".box1").css("height",h);
//当浏览器窗口大小改变时,设置显示内容的高度
window.onresize=function(){
changeDivHeight();
}
function changeDivHeight(){
h = document.documentElement.clientHeight;//获取页面可见高度
$(".box1").css("height",h);
}
})

</script>

原文:http://www.cnblogs.com/zmeieasyjob/p/4220651.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!