链接下载
a标签中的链接就是server 的地址即可
js 实现动态生成
function downloadFile(fileName, content){
var aLink = document.createElement('a');var blob = new Blob([content]);
var evt = document.createEvent("HTMLEvents");
evt.initEvent("click", false, false);
aLink.download = fileName;
aLink.href = URL.createObjectURL(blob);
aLink.dispatchEvent(evt);
}