Kizspy | Question: 27 (Choose 1 answer)
What is the correct syntax to change another source of the 2nd image?
<img src="image1.jpg" alt="the image can not change"/>
<img src="image2.jpg" alt="the image can change"/><img src="image3.jpg" alt="the image can not change"/>
A. document.getElementsByName("img").src="anotherImage.jpg";
B. document.getElements2ndByName("img").src="anotherImage.jpg";
C. document.getElementsByTagName("img").item(2).src="anotherImage.jpg";
D. document.getElementsByTagName("img")[1].src="anotherImage.jpg";