在谷歌下
fetch在ie下不支持
fetch(src).then(function (res) {
return res.blob()
}).then(function (data) {
console.log('fetch', data.size)
})
兼容IE11
var xhr = new XMLHttpRequest()
xhr.open('GET', src)
xhr.onload = function(data) {
console.log('xhr', data.loaded)
}
xhr.send()