how to change image onclick javascript function?
问题 I got a problem, I tried several times but result is always same, I don't know what's wrong with my code. If you click on right image, it will change to left image, but if you click on left image, it wont change to right image, why? here is code: function changeImage() { if (document.getElementById("changer").src == "imgs/left.gif") { document.getElementById("changer").src = "imgs/right.gif"; } else { document.getElementById("changer").src = "imgs/left.gif"; } } and image src code here: <img