87,904
社区成员
发帖
与我相关
我的任务
分享
function getBlobByUrl(url, callback) {
var xhr = new XMLHttpRequest();
xhr.open("get", url, true);
xhr.responseType = "blob";
xhr.onload = function() {
if (this.status == 200) {
callback && callback(this.response);
}
};
xhr.send();
}