<script>
var he=document.body.clientHeight-105;
document.write("<div id=tt style=height:"+he+";overflow:hidden>")
</script>这样对不对?
var he=document.body.clientHeight-105;
document.write("<div id=tt style=height:"+he+";overflow:hidden>")
</script>这样对不对?
<script>
//这里最好判断一下document.body.clientHeight是否大于105
var he = document.body.clientHeight - 105;
document.write("<div id='tt' style='height:"+he+"px;overflow:hidden;'>[div中要显示的内容]</div>")
</script>id,style此类的属性值最好用引号引起来,高度长度如果不是半分比最好加上单位