<HTML>
<HEAD>
<TITLE>Dynamicaly Adding Images to a DIV Using JavaScript</TITLE>
<script>
function fill_div()
{
document.getElementById("result").innerHTML="<img src='img.jpg'/>";
}
</script>
</HEAD>
<BODY>
<input type="button" value="Add Image to DIV" onClick="fill_div()">
<br>
DIV to be filled with image:
<DIV id="result" style="border:1px solid; width:200px; height:200px"></DIV>
</BODY>
</HTML>