Program:
Output:
<html> <head> <script> function clickEvent() { document.getElementById("img").src = "./Logo.png"; } function over() { document.getElementById("img").src = "./submit.jpg"; } function down() { document.getElementById("img").src = "./reset.jpg"; } function dblclickEvent() { document.getElementById("img").src = "./reset.jpg"; } </script> </head> <body> <form name="f"> <img src="./Logo.png" width="300" id="img" onmouseover="over()" onmousedown="down()"><br><br> <input type="button" value="Click" onclick="clickEvent()" name="b1"><br><br> <input type="button" value="Double Click" ondblclick="dblclickEvent()"><br><br> </form> </body> </html>
Output: