JavaScript Reference/Javascript Methods/writeln
"writeln()" Example
<source lang="javascript">
<html> <body> <script language="JavaScript"> function function1() {
var m = "First paragraph.
"; m += "second paragraph.
"document.writeln(m);
} </script> <input type="button" value="Add some HTML content to this page" onClick="function1();"> </body> </html>
</source>
"writeln()" is applied to
<source lang="javascript">
+----------------+--------------------------------------------------------------+ | Applied_To |document | +----------------+--------------------------------------------------------------+
</source>
"writeln()" Syntax, Parameters and Note
<source lang="javascript">
Note: Writes HTML document content followed by a carriage return.
Syntax:
document.writeln(param1) Parameters:
param1 Required; the text and HTML tags to write. </source>