<script type="text/javascript">
window.onload = function modify() {
var s = document.documentElement.clientHeight;document.getElementById("div1").style.height =s +"px";
}
window.onresize = modify;
</script>
我用这句代码获取窗口高度,然后让div的高度等于窗口高度,为什么会有滚动条,是不是还应该减去啥什么
<div id="div1">
<div id="div2" style="background-color:red;height:50%">
</div><div style="background-color:blue;height:50%"></div>
</div>来这干嘛
Judy_1024
elpsycongroo