Answer the question
In order to leave comments, you need to log in
How to change the picture?
How to change image in img tag in javascript?
Answer the question
In order to leave comments, you need to log in
In pure javascript
document.getElementById('myImage').src = '/path/to/img.jpg';
How to change image on click (jquery)
$("img").on("click", function() {
$(this).attr("src", "/path/to/new/img");
})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question