简单教程
提交运行
代码编辑器:
<p>注意write()方法不会在每个语句后面新增一行:</p> <pre> <script> document.write("Hello World!"); document.write("Have a nice day!"); </script> </pre> <p>注意writeln()方法在每个语句后面新增一行:</p> <pre> <script> document.writeln("Hello World!"); document.writeln("Have a nice day!"); </script> </pre>
运行结果: