日期:2014-05-16  浏览次数:20411 次

帮忙写个JS
就是关于框架的。如果浏览器的高度大于900px时显示bottom底部的框架。麻烦各位了

------解决方案--------------------
楼主不清楚你说的什么意思,是窗口大于900px;还是你的标签高度大于900px那?显示bottom的意思是不让显示它显示了,还是让显示出来?
------解决方案--------------------
没明白什么意思
------解决方案--------------------
先设置底部的style="display:none"
当if(documnet.getElementById("底部id").style.height>900){
documnet.getElementById("底部id").style.display = "block";
}
就可以了
------解决方案--------------------
if(document.body.scrollHeight>900){
documnet.getElementById("底部id").style.display = "block";
}

------解决方案--------------------
JScript code

 var H = (window.innerHeight|| (document.documentElement&&document.documentElement.clientHeight) || document.body.clientHeight || 0);

if(H > 900){
    documnet.getElementById("底部id").style.display = "block";
}