JavaScript Reference/Javascript Methods/writeln
Версия от 18:30, 25 мая 2010; (обсуждение)
"writeln()" Example
<html>
<body>
<script language="JavaScript">
function function1() {
var m = "<p>First paragraph.</p>";
m += "<p>second paragraph.</p>"
document.writeln(m);
}
</script>
<input type="button" value="Add some HTML content to this page" onClick="function1();">
</body>
</html>
"writeln()" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |document |
+----------------+--------------------------------------------------------------+
"writeln()" Syntax, Parameters and Note
Note:
Writes HTML document content followed by a carriage return.
Syntax:
document.writeln(param1)
Parameters:
param1 Required; the text and HTML tags to write.