document.writeln

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

Revision Content

Summary

Writes a string of text followed by a newline character to a document.

Syntax

document.writeln(line) 

Parameters

  • line is string containing a line of text.

Example

document.writeln("<p>enter password:</p>"); 

Notes

document.writeln is the same as document.write but adds a newline.

Specification

writeln

Revision Source

<p>
</p>
<h3 name="Summary">Summary</h3>
<p>Writes a string of text followed by a newline character to a document. 
</p>
<h3 name="Syntax">Syntax </h3>
<pre class="eval">document.writeln(<i>line</i>) 
</pre>
<h3 name="Parameters">Parameters </h3>
<ul><li><code>line</code> is string containing a line of text.
</li></ul>
<h3 name="Example">Example </h3>
<pre>document.writeln("&lt;p&gt;enter password:&lt;/p&gt;"); 
</pre>
<h3 name="Notes">Notes </h3>
<p><b>document.writeln</b> is the same as <a href="en/Document.write">document.write</a> but adds a newline. 
</p>
<h3 name="Specification">Specification </h3>
<p><a class="external" href="http://www.w3.org/TR/2000/WD-DOM-Level-2-HTML-20001113/html.html#ID-35318390">writeln </a>
</p>
Revert to this revision