html:
code:
<img src="image1.gif" id="Image" onclick="document.image.src = changepic(); return false;">
javascript:
code:
function changepic ()
if (document.Image.src =="path to image a") {
document.getElementByID("Image").src = "path to image b";
}
else{
document.getElementByID("Image").src = "path to image a";
}
I'm a little bit rusty on the JS, but i think it should be like this.