20th February 2019, 13:37
#2
5 out of 5 members found this post helpful.
Cod PHP:
<div id="container">
<img src="http://static.asiawebdirect.com/m/phuket/portals/phuket-com/homepage/island/naiharn-beach/pagePropertiesImage/naiharn-beach.jpg" onclick="change_image_with_iframe()">
</div>
<script>
function change_image_with_iframe()
{
var container = document.getElementById('container');
container.innerHTML = '<iframe src="http://example.com/"></iframe>'
}
</script>
<style>
#container {
width: 400px;
height: 265px;
}
#container img,
#container iframe {
width: 100%;
height: 100%;
}
</style>