当前位置: 代码迷 >> HTML/CSS >> firefox,ie兼容有关问题
  详细解决方案

firefox,ie兼容有关问题

热度:110   发布时间:2012-04-13 13:50:24.0
firefox,ie兼容问题
$("#statelist").css("height",document.body.clientHeight-145+'px');
这个代码对firefox 有效
但是在IE里就不执行
要怎么改,才能兼容呢

------解决方案--------------------
document.body.clientHeigh改成>
$(document).height()
------解决方案--------------------
alert($(window).height()); //浏览器当前窗口可视区域高度 
alert($(document).height()); //浏览器当前窗口文档的高度 
alert($(document.body).height());//浏览器当前窗口文档body的高度 
alert($(document.body).outerHeight(true));//浏览器当前窗口文档body的总高度 包括border padding margin 
alert($(window).width()); //浏览器当前窗口可视区域宽度 
alert($(document).width());//浏览器当前窗口文档对象宽度 
alert($(document.body).width());//浏览器当前窗口文档body的高度 
alert($(document.body).outerWidth(true));//浏览器当前窗口文档body的总宽度 包括border padding margin
  相关解决方案