79625836

Date: 2025-05-16 19:44:57
Score: 1
Natty:
Report link

Other way to do it is using query selector querySelector to select image class and set its src attribute to the new path.

var image1 = document.querySelectorAll("img")[0];
image1.setAttribute("src","/images/image1.png")

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: RiodaHamster