<script type="text/javascript">
window.onload = windowHeight; //页面载入完毕执行函数
function windowHeight() {
var h = document.documentElement.clientHeight; //获取当前窗口可视操作区域高度
var bodyHeight = document.getElementById("wrap"); //寻找ID为wrap的对象
bodyHeight.style.height = (h - 100) + "px";
}
setInterval(windowHeight, 500)windowHeight函数
script>
0条评论