10,611
社区成员
发帖
与我相关
我的任务
分享

response.reset();//可以加也可以不加
response.setContentType("application/x-download");
response.addHeader("Content-Disposition","attachment;filename=slservSearchManage.xls");
SlServSearchManageClient Client = new SlServSearchManageClient();
if(operType.equals("export")){//测试日志导出
Client.exportExcelForTestLog(request,response);
}
%>
<script>
window.close();
self.close();//关闭子页面
</script>
if(operType.equals("export")){//测试日志导出
Client.exportExcelForTestLog(request,response);
}
%>
<script>
alert('close download window');
window.close();
self.close();//关闭子页面
</script>
因此我才改成新页面下载的,弹出新页面用户知道已经开始下载了,就不能弹出loading图标了。<a target="if" href="http://dlsw.baidu.com/sw-search-sp/soft/3a/12350/QQ6.9.13786.0.1422410355.exe">下载</a>
<iframe name="if" style="display:none;"></iframe>