vue按钮下载服务器文件基于a标签download
let link = document.createElement("a");link.style.display = "none";link.href ="http://www.baidu.com/asdfa.zip";console.log(link.href)link.setAttribute("download", "文件名称");document..
·
let link = document.createElement("a");
link.style.display = "none";
link.href ="http://www.baidu.com/asdfa.zip";
console.log(link.href)
link.setAttribute("download", "文件名称");
document.body.appendChild(link);
link.click();
更多推荐
已为社区贡献9条内容
所有评论(0)