Skip to content Skip to sidebar Skip to footer

On Mouse Over Change Image On Html

I was trying to make an image to change on mouse over. This piece of code works for IE but not for the other browsers like chrome, opera, safari, etc. Any ideas?

Solution 1:

Solution 2:

<ahref=""onMouseOver="document.MyImage.src='http://icons.iconarchive.com/icons/uiconstock/round-edge-social/72/ask-icon.png';"onMouseOut="document.MyImage.src='http://icons.iconarchive.com/icons/uiconstock/round-edge-social/72/arto-icon.png';"><imgsrc="http://icons.iconarchive.com/icons/uiconstock/round-edge-social/72/arto-icon.png"name="MyImage">

Demo http://jsfiddle.net/W6zs5/

Solution 3:

Try this:

<imgsrc='img/login_button_11.jpg'onmouseover="this.src='img/login_button_22.jpg';"onmouseout="this.src='img/login_button_11.jpg';" />

Post a Comment for "On Mouse Over Change Image On Html"