HTML DOM writeln() 方法
定義和用法
writeln() 方法與 write() 方法作用相同,外加可在每個表達式后寫一個換行符。
語法
document.writeln(exp1,exp2,exp3,....)
提示和注釋
提示:在編寫 <pre> 標記的內容時,該方法很有用。
實例
<html>
<body>
<script type="text/javascript">
document.writeln("Hello World!")
;
</script>
</body>
</html>