document.write

書式

document.write(書き出すデータ)

説明

ドキュメント上にデータを出力します。サブウィンドウやフレームにデータを書き出す場合にはopen()でストリームを開いておく必要があります。

サンプルコード [実行]

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>Sample</title>
</head>
<body>
<script type="text/javascript"><!--
document.write("write test");
// --></script>
</body>
</html>