エレメント(タグ)を作成する

<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>Sample</title>
<script type="text/javascript" src="prototype.js"></script>
<script type="text/javascript"><!--
function controlTag()
{
imgObj = document.createElement("img");
imgObj.src = "dog.jpg";
$("result").appendChild(imgObj);
}
// --></script>
</head>
<body id="body">
<h1>XML/HTMLデータ処理</h1>
<form>
<input type="button" value="imgエレメント追加" onClick="controlTag()">
</form>
<div id="result"></div>
</body>
</html>
・サンプルを実行する
Ajax逆引きクイックリファレンス 説明などは本書を参考にしてください。