Very simple thing which I am not able to do. I have two images viz. try.jpg and menuBack.jpg. Initially, I put try.jpg as image source but as soon as the page loads I want to change it to the other image.
HTML:
<img id="imgSlider" width="284px" height="284px" src="try.jpg"/> JavaScript:
window.onload = initAll; function initAll() { var imageSrc = document.getElementById("imgSlider").src; imageSrc == "menuBack.jpg"; } What's wrong here?