<img src="http://" onclick="document.getElementById('photo').innerHTML = '<img src=\'http://\' />';" /> <div id="photo"> </div>