Answers for "adding image tag javascript"

4

javascrpit add image element

function add_img() { 
	var img = document.createElement('img'); 
    img.src = 'https://media.geeksforgeeks.org/wp-content/uploads/20190529122828/bs21.png'; 
	document.getElementById('body').appendChild(img);
}
Posted by: Guest on October-24-2020
6

how to add image in html

<img src="img_girl.jpg" alt="Image Load Error" width="500" height="600">
Posted by: Guest on July-25-2020

Browse Popular Code Answers by Language