Javascript 在IE中获得内部高度
我想在IE中获得内部高度。我的页面内容很长,浏览器有一个滚动条 我是通过Javascript 在IE中获得内部高度,javascript,jquery,Javascript,Jquery,我想在IE中获得内部高度。我的页面内容很长,浏览器有一个滚动条 我是通过window.innerHeight获得的。它在Firefox和Chrome上运行,但在IE上不起作用(在IE9上试用过) 有办法得到它吗 请参阅屏幕截图: p.S. 我的问题是另一回事我的IE在怪癖模式下运行 当IE在标准模式下运行时,$(window.height()和window.innerHeight都可以工作。您尝试过吗: window.height();//jquery 或者使用jQuery: $(windo
window.innerHeight
获得的。它在Firefox和Chrome上运行,但在IE上不起作用(在IE9上试用过)
有办法得到它吗
请参阅屏幕截图:
p.S.
我的问题是另一回事我的IE在怪癖模式下运行
当IE在标准模式下运行时,
$(window.height()
和window.innerHeight
都可以工作。您尝试过吗:
window.height();//jquery
或者使用jQuery:
$(window).height();
试试下面的例子
$(document).height(); // Just returns the actual height of the conatiner
$(document).innerHeight(); // including padding but not border.
$(document).outerHeight(); // including padding and border.
$(document).outerHeight(true); // if wants margin height means Including margin, padding, border and height
$(document).height(); // Just returns the actual height of the conatiner
$(document).innerHeight(); // including padding but not border.
$(document).outerHeight(); // including padding and border.
$(document).outerHeight(true); // if wants margin height means Including margin, padding, border and height