How do I change an image using JavaScript?
I made this code here but it did not work.
HTML file
<a href="passo1.html" target="janela">
<img id="passo1" class="passo" src="img/passo_color1.png" style="float:left">
</a>
JS file
teste = document.querySelector("#passo1").addEventListener('click', function(){
teste.src = "img/passo_color.jpg";});