|
HTML DOM writeln() Method
Complete Document Object Reference
Definition and Usage
The writeln() method is identical to the write() method, with the addition of
writing a new line character after each expression.
Syntax
|
document.writeln(exp1,exp2,exp3,....)
|
Example
Use document.writeln() to write text to the output:
<html>
<body>
<script type="text/javascript">
document.writeln("Hello World!")
</script>
</body>
</html>
|
|
Try-It-Yourself Demos
Use
document.writeln() to write text with formatting to the output Use
document.writeln() with several expressions
Complete Document Object Reference
|