I am trying to display an image using purely javascript. I have found various examples that work using html and javascript, but no pure javascript solution. Here is the non working code I have right now,
<script type="text/javascript">
if(document.images)
(new Image()).src="http://www.example.com/image.png";
</script>