Java实现文件下载

一.html

  <button class="ui-btn ui-btn-primary left20" onclick="downloadXlsTemplate()">下载模板</button>

二.js

function downloadXlsTemplate() {
    window.location.href = encodeURI(basePath + "resources/templates/客户数据导入模板.xls");
}
原文地址:https://www.cnblogs.com/dslnn/p/10330191.html