Ian*_*oyd 5 html html5 internet-explorer dom quirks-mode
近十年来我一直在使用:
document.body.scrollHeight
Run Code Online (Sandbox Code Playgroud)
返回浏览器窗口的" 理想 "高度.当我通过使用quirks-mode doctype 强制 Internet Explorer进入怪癖模式时,这很好用:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
Run Code Online (Sandbox Code Playgroud)
现在我想选择标准模式,除了意义scrollHeight已经改变:
document.body.scrollHeight=文档的高度document.body.scrollHeight= <body>元素的高度什么是标准模式相当于document.body.scrollHeight?
document.documentElement.scrollHeight我相信。
对于视口来说,它window.innerHeight适用于现代浏览器。
如果以上内容不是您想要的,这里是其中的一些列表:
| 归档时间: |
|
| 查看次数: |
6153 次 |
| 最近记录: |