button click for image

PHOTO EMBED

Wed Apr 10 2024 02:55:46 GMT+0000 (Coordinated Universal Time)

Saved by @skatzy

<div>
			<h1>GeeksforGeeks</h1>
			<h3>Click on the button to see image</h3>
			<!-- img element without src attribute -->
			<img id="image" src="" />
		</div>
		<button type="button" onclick="show()" id="btnID">
			dixwell
		</button>	
		<script>
			function show() {
				/* Get image and change value 
				of src attribute */
				let image = document.getElementById("image");
				image.src = "495+Dixwell+Avenue.jpeg"
				document.getElementById("btnID")
					.style.display = "none";
			}
		</script>
content_copyCOPY

https://www.geeksforgeeks.org/how-to-show-images-on-click-using-html/#