Change Image | JavaScriptSource

Change Image

JavaScriptSource Staff Sep 9, 2000
It's always neat to dynamically change an image when the user touches it. For this example, I have one image and when you put your cursor on it, it changes to another. If you use this script, be sure to use images of the same size!

TJS Guestbook

[ Don't forget to use the preload images script! ]

The JavaScript Source: Misc.: Change Image

Simply click inside the window below, use your cursor to highlight the script, and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as NotePad or SimpleText) and save (Control-s or Apple-s). The script is yours!


Did you use this script?  Do you like this site?  Please link to us!

Leave a Response


this is the most greous popular code

amit Nov 16, 2014

I cant figure out whats wrong with this, please help! [removed] function ChangeImage(template, template2) { var image= document.getElementById(template2) image.scr= template2 } [removed]

Trevor Aug 12, 2013

good job.

sanxiv Jul 10, 2012

its good

shanthi Nov 20, 2008