已废弃
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
Note: 在Gecko的6.0版本之后, document.height
不再被支持。 使用 document.body.clientHeight来代替
. 详见 element.clientHeight
.
语法
pixels = document.height
示例
// alert document height
alert(document.height);
可选操作
document.body.clientHeight document.documentElement.clientHeight document.documentElement.scrollHeight
规范
HTML5
兼容性
BCD tables only load in the browser
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.