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