Document.height
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since julho de 2015.
Nota:
A partir do Gecko 6.0, document.height
não é mais suportado. Em seu lugar use document.body.clientHeight
. Veja element.clientHeight
.
Sumário
Retorna a altura do objeto document
. Em muitos casos, isto é igual à do elemento <body>
do documento atual.
Sintaxe
height_value = document.height
Exemplo
js
// alert document height
alert(document.height);
Alternativas
document.body.clientHeight document.documentElement.clientHeight document.documentElement.scrollHeight
Especificação
HTML5