0
Changing image attribute
Please explain how to change image src attribute using document object My code: https://code.sololearn.com/W2oW3lnA0Waw/?ref=app Thanks in advance
5 Answers
+ 3
O.Naga Lakshmi Lalasa your code is working perfectly. You just need a valid online url.
Ore Adeleye's code is also fine.
+ 3
https://code.sololearn.com/Ww4GVzzFr5AR/?ref=app
https://www.sololearn.com/discuss/389765/?ref=app
https://www.sololearn.com/discuss/2138994/?ref=app
https://www.sololearn.com/discuss/1572389/?ref=app
https://www.sololearn.com/discuss/2215338/?ref=app
https://www.sololearn.com/discuss/803683/?ref=app
+ 1
Thankyou so much.You've given everything i needed.
0
el.setAttribute("src", "apple.png")
0
Kevin image tag doesn't work for me all the time.Even if i give exact path of an image still image will not be displayed.can you please explain me syntax of image tag and an example in HTML?Thanks in advance.
Hot today
Python — File Handling
2 Votes
What’s wrong?
2 Votes
Question is write a c program to print prime numbers up to n and print the largest number in array.
1 Votes
Achievements on Sololearn
1 Votes
How to draw in the console?
0 Votes
Question - Java: Pyramid layers
2 Votes