Change Images

On August 6, 2009, in Javascript, PHP, Tips, Tricks, by phpsolutions

/*
change image on mouseover and click
*/
function mEvent(id,img1,img2,img3) {
var i = new String();
i = document.images[id].src;
document.images[id].src = i.replace(img2,img1);
//for click condition
if(document.images[id].src.indexOf(img3)!=-1)
document.images[id].src = i.replace(img3,img1);
}

Tagged with:  

3 Responses to Change Images

  1. Anonymous says:

    I was just browsing every now and then along with to read this post. I have to admit that i’m inside the hand of luck today or maybe getting such an excellent post to learn to read wouldn’t happen to be achievable to me, no less than. Really appreciate your articles.

  2. Anonymous says:

    I must say i loved this post. You describe this topic perfectly. When hiring home contractors it is answer to select a trusted name in construction. Experienced and efficient staff should shoot for excellence and pay close attention to every detail of your property.

  3. Anonymous says:

    You completed several good points there. I did looking on the issue and located virtually all people should go in addition to with all your blog.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.