前端实现导出以及下载
生活随笔
收集整理的這篇文章主要介紹了
前端实现导出以及下载
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1.使用a標簽跳轉,觸發a標簽的click事件,提交
function exportFile(item){
? ? ? ? var url =http+"/interface/exportApp?interfaceName="+interfaceName+"&startDate="+startDate+"&overDate="+overDate+"&pageNo="+pageNo+"&pageSize="+pageSize;
? ? ? ? console.log(url);
? ? ? ? document.getElementById("ifile").src=url;
? ? ? ? $(item).find("a").trigger("click");
? ? };
2.使用form表單提交,input里放參數
<form action="${pageContext.request.contextPath}/manager/exportAction/listPageData"method="get" id="search_form">
???? <input type="hidden" id="areaType" name="areaType">
<input type="hidden" id="idList" name="idList">
<a class="btn btn-success" id="h-submitBtn" οnclick="document:search_form.submit();" id="export">excel導出</ a>
</form>
總結
以上是生活随笔為你收集整理的前端实现导出以及下载的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 可自由配置的图文混排控件——组合法
- 下一篇: 2017年html5行业报告,云适配发布