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