var el = document.getElementById("myimg");
el.src = "https://www.sololearn.com/Images/home-new/1073.png";
HTML<img id="myimg" src="https://www.sololearn.com/Images/home-new/1068.png" alt="" />
Note: Practically all attributes
of an element can be changed using JavaScript