1 <h2>Change image onClick event here...</h2>
2 <img src="imageName1.jpg" onmouseover="imagefun()" id="getImage">
3
4 <script>
5 function imagefun() {
6 var Image_Id = document.getElementById('getImage');
7 if (Image_Id.src.match("imageName1.jpg")) {
8 Image_Id.src = "imageName2.jpg";
9 }
10 else {
11 Image_Id.src = "imageName1.jpg";
12 }
13 }
14 </script>