js实现兼容IE6与IE7的DIV高度
时间:2021-07-01 10:21:17
帮助过:21人阅读
代码如下:
<body onload="setHeight()">
<script type="text/javascript">
function setHeight() {
var PageHeight=$("oPage").scrollHeight
var MaxHeight=507
if(PageHeight>MaxHeight)
{
$("oPageMain").style.height=$("oPage").scrollHeight + 40 +"px"
$("oRight").style.height=$("oPage").scrollHeight + 120 +"px"
$("oMain").style.height=$("oPage").scrollHeight + 211 +"px"
}
}
</script>