0
How to show image on browser by using javascript. Plz tell me code.
2 Respuestas
+ 2
var img = document.createElement("img");
img.src = "...";
img.alt = "?";
document.body.appendChild(img);
+ 1
You can easily add an image using HTML:
<img src="example.com"></img>
If you really want to use js, consider Jonas Schröter 's example