Jump to content

Image change on onMouseOut


DampDog
 Share

Recommended Posts

Hello, I'm a novice at HTML so chances are I'm not doing this the correct way. What I want to do is have an image on the page either flip from one image to another, or prefrably have an image appear where there was no image before when I hover over the link. I've added this to a link.<tr><td class="links"><a href="StartPage.html" onMouseOver="document.pic1.src='index/Earth.gif'" onMouseOut="document.pic1.src='index/health.gif">Health Stuff</a></td></tr>The image.....<td class="peek"><center><span ><img name="pic1"></SPAN> </center></td>I see a change when I onMouseOver but no change onMouseOut.What am I doing wrong?

Link to comment
Share on other sites

Here is a site I built almost 10 years ago. Look at the source code and refer to javascript there - it's one of the cleanest mouseover scripts you'll find.http://www.deepcreeklakebreezmotel.com/If you want to replace an image that "isn't there" then put a blank/transparent gif/png as a place holder to where you want the image to go.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...