manikant yadav

Generation

when click ln a image next image come

html <img src="img_pulpit.jpg" onclick="myFunction(this);" width="100" height="140"> <img src="img_pulpit2.jpg" onclick="myFunction(this);" width="100" height="140"> <script> function myFunction(imgs) { var expandImg = document.getElementById("expandedImg"); var imgText = document.getElementById("imgtext"); expandImg.src = imgs.src; imgText.innerHTML = imgs.alt; expandImg.parentElement.style.display = "block"; } </script>

Want to kickstart your project?Use the new AI Studio to create your code