how to set src of image in html code example Example: how to change image source using javascript document.getElementById("myImg").src = "hackanm.gif";