Q:

insert image using set atribute

<img src="images/foo.png">
0
var img = document.getElementById("example");
console.log(img.getAttribute("src")); // "images/foo.png"
console.log(img.src);                 // "http://example.com/path/images/foo.png"
0

New to Communities?

Join the community