document.writeln
ドキュメント上にデータを出力し最後に改行コードを付加します。<pre>など改行コードが反映されるタグで囲むかスタイルシートで改行が反映されるように設定しておく必要があります。また、サブウィンドウやフレームにデータを書き出す場合にはopen()でストリームを開いておく必要があります。
構文
document.writeln(書き出すデータ)
例文
<html>
<head>
<title>document.writeln</title>
</head>
<body>
<pre>
<script type="text/javascript"><!--
document.writeln("write test1");
document.writeln("write test2");
// --></script>
</pre>
</body>
</html>
関連記事
- document.write
- document.vlinkColor
- document.linkColor
- document.alinkColor
- document.fgColor
- document.defaultCharset
- document.charset
- document.characterSet
- document.bgColor
スポンサーリンク





