📜  javascrpit 添加图像元素 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:13.147000             🧑  作者: Mango

代码示例1
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);
}