aboutsummaryrefslogtreecommitdiff
path: root/files/pt-br/web/api/document/height/index.html
blob: 5dedba8f998ac662e2d16959753b34b809fa6bd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
---
title: Document.height
slug: Web/API/Document/height
translation_of: Web/API/Document/height
---
<div>{{APIRef("DOM")}} {{Obsolete_header}}</div>

<div class="note">
<p><strong>Nota:</strong> A partir do {{Gecko("6.0")}},<code> document.height </code> não é mais suportado. Em seu lugar use <code>document.body.clientHeight</code>. Veja {{domxref("element.clientHeight")}}.</p>
</div>

<h2 id="Sumário">Sumário</h2>

<p>Retorna a altura do objeto {{domxref("document")}}. Em muitos casos, isto é igual à do elemento {{HTMLElement("body")}} do documento atual.</p>

<h2 id="Syntax" name="Syntax">Sintaxe</h2>

<pre class="syntaxbox"><em>height_value</em> = document.height
</pre>

<h2 id="Exemplo">Exemplo</h2>

<pre class="brush: js">// alert document height
alert(document.height);
</pre>

<h2 id="Alternativas">Alternativas</h2>

<pre class="syntaxbox">document.body.clientHeight
document.documentElement.clientHeight
document.documentElement.scrollHeight
</pre>

<h2 id="Especificação">Especificação</h2>

<p>HTML5</p>

<h2 id="Veja_também">Veja também</h2>

<ul>
 <li>{{domxref("document.width")}}</li>
 <li>{{domxref("Element.clientHeight")}}</li>
 <li>{{domxref("Element.scrollHeight")}}</li>
</ul>