+5

Does anyone know how to change an image with JavaScript?

Example: HTML: <img src="https://image" id="image"> JS: var image=document.getElementById('image'); And i don't know how to change the image in JavaScript, like here the image's source is "https://image", how to change it to for example to "https://hello", using javascript?

1/19/2020 3:57:54 PM

Bunny

5 Answers

New Answer

+6

https://code.sololearn.com/Ww4GVzzFr5AR/?ref=app

+3

Thank you Kevin Star and visph for answering my question and helping me

+2

image.src = "https://hello"

+2

You are welcome 😃

0

thanks a lot I wish u could come in my country