📜  从链接js嵌入图片 - Javascript代码示例

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

代码示例1
var img = new Image();
img.src = 'image.png';
img.onclick = function() {
    window.location.href = 'http://putyourlocationhere/';
};
document.body.appendChild(img);