URL.createObjectURL(url),创建的blob地址,放在A标签上下载的时候,如何打开这个资源选择器保存框?
var url = window.URL.createObjectURL(blob);
var a = document.createElement('a');
a.style.display = 'none';
a.href = url;
a.download = 'xxx.xx';//文件名
document.body.appendChild(a);
a.click();
setTimeout(() => {//释放资源
document.body.removeChild(a);
window.URL.revokeObjectURL(url);
}, 100);