Document.close

  • Revision slug: DOM/document.close
  • Revision title: document.close
  • Revision id: 9677
  • Created:
  • Creator: Dria
  • Is current revision? No
  • Comment

Revision Content

{{template.DomRef()}}

Summary

The document.close() method finishes writing to the open document.

Syntax

document.close() 

Example

// open a document to write to it.
// finish by closing the document.
document.open();
document.write("<P>The only content</P>.");
document.close();

Specification

DOM Level 0. Not part of specification.

Revision Source

<p>
{{template.DomRef()}}
</p>
<h3 name="Summary">Summary</h3>
<p>The document.close() method finishes writing to the open document. 
</p>
<h3 name="Syntax">Syntax </h3>
<pre>document.close() 
</pre>
<h3 name="Example">Example </h3>
<pre>// open a document to write to it.
// finish by closing the document.
document.open();
document.write("&lt;P&gt;The only content&lt;/P&gt;.");
document.close();
</pre>
<h3 name="Specification">Specification </h3>
<p>DOM Level 0. Not part of specification.
</p>
Revert to this revision