【发布时间】:2010-11-11 20:44:03
【问题描述】:
某些文档我无法获得文档的高度(将某些东西绝对定位在最底部)。此外,padding-bottom on 似乎在这些页面上没有任何作用,但在高度将返回的页面上起作用。案例:
http://fandango.com
http://paperbackswap.com
在范丹戈
jQuery 的 $(document).height(); 返回正确值document.height 返回 0document.body.scrollHeight 返回 0
关于平装书交换:
jQuery 的 $(document).height(); TypeError: $(document) is nulldocument.height 返回一个不正确的值document.body.scrollHeight 返回一个不正确的值
注意:我有浏览器级别的权限,如果那里有什么技巧的话。
【问题讨论】:
-
$(document) 为空,因为该站点没有加载 jQuery...
-
嗯,我可以发誓我检查了其他东西以确认 jQuery 已注册,但它看起来不像我那样做,哈!我以为firebug已经打包了jQuery......嗯,我想我会检查一下,如果它是一个解决方案。
-
firebug 没有 jQUery 打包
-
见Finding the size of the browser window。它有一个很好的不同浏览器行为的表格。
标签: javascript