Try the following code snippet. This solution should work independent of popular libraries like jquery.
Copy and paste this code into the HTML of a page and see if it does what you want.
Change the image_url value to whatever image you have. You can give it an absolute or relative path.
<script language="javascript" type="text/javascript">
var image_url="myimage.png";
function loadImageInDiv()
{
// get reference to the div element that will contain the image
var div = document.getElementById("imageDisplay");
// remove children, if there are any.
while (div.firstChild)
div.removeChild(div.firstChild);
var img = document.createElement("img");
img.src=image_url;
// add the image to the div so it becomes visible in the page.
div.appendChild(img);
}
</script>
<!-- The div element that will display the image -->
<div id="imageDisplay">
</div>
<!-- the button to be clicked -->
<input type="button" value="Click Me" onclick="loadImageInDiv()" />