JavaScript Reference/Javascript Methods/writeln — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 08:22, 26 мая 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.