Is there a way of implementing roll over images using javascript....?
Is there a way of implementing roll over images using javascript....?
When you would like to change the displayed image roll over you may use this function
HTML Code:<img src="1.jpg" onmouseover="this.src='2.jpg'" alt="" />
Follow-up to Zoli's reply:
Probably you would need to add the onmouseout to change back your image to the original source. I.e.:
HTML Code:<img src="1.jpg" onmouseover="this.src='2.jpg'" onmouseout="this.src='1.jpg'" alt="" />
2WDH.com .:. Professional Hosting since 2003
You would need to paste the following code in <HEAD></HEAD> tags.
After that you can use this code in <BODY></BODY> tags<script language="Javascript">
<!--
//Slide Show script (this notice must stay intact)
if (document.images) {
button1 = new Image
button2 = new Image
button1.src = 'img1.gif'
button2.src = 'img2.gif'
}
//-->
</script>
I hope, it will be helpful for you.<a href="yourwebsite" onmouseover="document.rollover.src=button2.src" onmouseout="document.rollover.src=button1.src"><im g src="img1.gif" border=0 name="rollover"></a>
Bookmarks