aboutsummaryrefslogtreecommitdiff
path: root/files/es/web/api/document/close/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/es/web/api/document/close/index.html')
-rw-r--r--files/es/web/api/document/close/index.html27
1 files changed, 27 insertions, 0 deletions
diff --git a/files/es/web/api/document/close/index.html b/files/es/web/api/document/close/index.html
new file mode 100644
index 0000000000..313678de2c
--- /dev/null
+++ b/files/es/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>El método <code>document.close()</code> finaliza la escritura de un documento abierta con <a href="/en/DOM/document.open" title="en/DOM/document.open">document.open()</a>.</p>
+
+<h2 id="Syntax" name="Syntax">Sintaxis</h2>
+
+<pre class="eval">document.close();
+</pre>
+
+<h2 id="Example" name="Example">Ejemplo</h2>
+
+<pre>// Abrir un documento.
+// Escribir contenido en el documento.
+// Cerrar el documento.
+document.open();
+document.write("&lt;p&gt;El único contenido.&lt;/p&gt;");
+document.close();
+</pre>
+
+<h2 id="Specification" name="Specification">Especificación</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>