diff options
Diffstat (limited to 'files/pt-br/web/api/document/close')
| -rw-r--r-- | files/pt-br/web/api/document/close/index.html | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/files/pt-br/web/api/document/close/index.html b/files/pt-br/web/api/document/close/index.html new file mode 100644 index 0000000000..7c9b110edd --- /dev/null +++ b/files/pt-br/web/api/document/close/index.html @@ -0,0 +1,27 @@ +--- +title: Document.close() +slug: Web/API/Document/close +translation_of: Web/API/Document/close +--- +<p>{{APIRef("DOM")}}</p> + +<p>O metodo <code>document.close()</code> termina a gravação em um documento, aberto com <a href="/en/DOM/document.open" title="en/DOM/document.open">document.open()</a>.</p> + +<h2 id="Syntax" name="Syntax">Sintaxe</h2> + +<pre class="eval">document.close(); +</pre> + +<h2 id="Example" name="Example">Exemplo</h2> + +<pre>// abre um documento e escreve nele. +// escreve o conteúdo no documento. +// fecha o documento. +document.open(); +document.write("<p>O primeiro e unico conteúdo.</p>"); +document.close(); +</pre> + +<h2 id="Specification" name="Specification">Especificação</h2> + +<p><a class="external" href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-98948567">DOM Level 2 HTML: <code>close()</code> Method</a></p> |
