954,153 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

loading an image on hover over a link

hi
i am new to java script and i am designing my web site but i want to load a new image on a particular place of my web page when a user hover over the home,contact us link
so pls tell how can i do this if you have the code then send to me
THANKU
-PC(INDIA)

cpeeyush1
Light Poster
29 posts since Sep 2008
Reputation Points: 10
Solved Threads: 2
 

I would use flash to do all this fancy effects.

dreamer14
Light Poster
31 posts since Sep 2008
Reputation Points: 10
Solved Threads: 1
 

@cpeeyush1 - JSP stands for Java Server Pages not Java Script. Post moved!

peter_budo
Code tags enforcer
Moderator
15,432 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 901
 

Things can be done with CSS.
But here's a basic example to get you started...

<img src="yourImage.jpg" alt="[ Home ]" id="image1" onmouseover="this.src='home.jpg';" onmouseout="this.src='myImage.jpg';" />
<a href="#" onmouseover="document.getElementById('image1').src='home.jpg';" onmouseout="document.getElementById('image1').src='yourImage.jpg';">Hoover Me!</a>
essential
Posting Shark
974 posts since Aug 2008
Reputation Points: 114
Solved Threads: 138
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You