RPG Websolutions: 
Website designing Company Delhi, Web development Company Delhi, SEO Company Delhi India
 01 Home
Domain names & hosting CD Presentations
  Home > Articles > Change Image on Mouseover
 Back to Home page

 Articles

  Change Image on Mouseover

Developing high quality website requires small tricks to be implemented. To make visually impressive website you can change image on mouse over specially buttons.

Its just a small code which make change of image on mouseover. Mouseover on image given below:

(first copy code in notepad then copy code from notepad ->paste in editor)

Add this code in Head tag:

<script>
function change_image(a,target)
{ x=document.getElementById(a);
x.src=target;}
</script>

 

Add this code in Body Tag:

<img src="web_developement.jpg" width="92" height="67" id="image1" onMouseOver="change_image('image1','programming.jpg')" onMouseOut="change_image('image1','web_developement.jpg')">

Define your image path where required.

If you want to add this effect to more images
1. just keep changing ID of your image and pass this ID to function.
2. Define the name of target image to be changed on mouseover or mouseout.
3. Note that on mouseout we have to define default image as target image because on mouseout we want our default image back.

«— Back to Articles..
   


webhosting delhi
Web designing
Web Development Company india
Web development
Web Development Company india
Search Engine Optimization
Web Development Company india
Domain names & hosting
Web Designing Delhi
CD Presentations
 
 
   
   
   
© RPG Interactive Services Pvt Ltd 2006  / Privacy Policy  / Terms & Conditions / Resources  Phone 9810236266
Top ecommerce web services