有些文档我无法获得文档的高度(将某些内容绝对放在最底部).此外,底部填充似乎不会对这些页面起作用,但会对高度会返回的页面起作用.一个(或多个)恰当的例子:
http://fandango.com
http://paperbackswap.com
On Fandango
jQuery's $(document).height();
returns correct value
document.height
returns 0
document.body.scrollHeight
returns 0
On Paperback Swap:
jQuery's $(document).height();
TypeError: $(document)
is null
document.height
returns an incorrect value
document.body.scrollHeight
returns an incorrect value
注意:我有浏览器级别的权限,如果有一些技巧的话.