<script type="text/javascript">
function doExec(){
var block=document.createElement('div');
block.id='workimage';
var image=document.createElement('img');
image.src='http://javascript.ru/forum/images/ca_serenity/misc/logo.gif';
block.appendChild(image);
var obj=document.getElementById('img_container');
obj.appendChild(block);
}
</script>
<div id="img_container"></div>
<button onclick="doExec();">Добавить div и img</button><br />
<button onclick="window.alert(document.getElementById('img_container').innerHTML);">Посмотреть innerHTML</button>