+ 1

When trying to add a image what code do you write in java script

5th Oct 2018, 8:24 PM
Latoya Williams
Latoya Williams - avatar
4 ответов
+ 6
document.getElementsByTagName("img")[x].src=""; x is your img tag index in html page
5th Oct 2018, 8:28 PM
AliR૯za
AliR૯za - avatar
+ 5
this set src to an existing img tag so you need to create img tag in html before use it
5th Oct 2018, 8:31 PM
AliR૯za
AliR૯za - avatar
0
thc
5th Oct 2018, 8:29 PM
Latoya Williams
Latoya Williams - avatar
0
thx
5th Oct 2018, 8:29 PM
Latoya Williams
Latoya Williams - avatar