Life Moves On

My Experience With Technology

Monday, March 09, 2009

Changing the background image of an element on mouseover

If you would like to change the background image of any element using javascript use the following code on the same tag

onmouseover="this.style.background='url(images/home2.gif) no-repeat';" onmouseout="this.style.background='url(images/home1.gif) no-repeat';"

Labels: , ,

0 Comments:

Post a Comment

<< Home