So I am trying to change the source of my HTML image element. I used document.getElementId('image') to change it but my code is not working and I get no errors. If i erase that line of code the sign variable works and the sign shows up in my site.
HTML CODE:
<img src="images/zodiac.jpg" alt="Chinese Zodiac">
Javascript CODE:
document.getElementById("images/zodiac.jpg").src = image;
document.getElementById("images/zodiac.jpg").src = image;here u made mistake ..