0
var xhr = new XMLHttpRequest();
xhr.open('GET', 'https://supersweetdomainbutnotcspfriendly.com/image.png',true);
xhr.responseType = 'blob';
xhr.onload = function(e) {
var img = document.createElement('img');
img.src = window.URL.createObjectURL(this.response);
document.body.appendChild(img);
};
xhr.send();
通过使用这我可以得到的图像,但默认的大小。所以请告诉我如何设置该图像的宽度和高度?如何在Chrome应用程序中设置图片的宽度和高度?
添加两行三江源这么多。 –