菜鸟教程 tryjsref_doc_writeln 在线代码实例

运行 保存 全屏 右侧展示 实时查看
主题:

 <p>Note that write() does NOT add a new line after each statement:</p>

<pre><script>
document.write("Hello World!");
document.write("Have a nice day!");
</script>
</pre>


<p>Note that writeln() add a new line after each statement:</p>

<pre><script>
document.writeln("Hello World!");
document.writeln("Have a nice day!");
</script>
</pre>