我的页面
<div id="page-content"> <div>下载<a id="download" href="javascript:void(-1)">咨询电话接听明细模板</a>,填写后导入</div> <input type="file" name="file_upload" id="file_upload"/> </div>
js代码
$("#download").click(function(){ window.open( window.location.protocol+"//"+window.location.host+"/resourcemngctrl/pages/taxservhotline_eva/detail.xlsx", "_blank"); });
web.xml
<mime-mapping> <extension>xlsx</extension> <mime-type>application/msexcel</mime-type> </mime-mapping>