导出excel表-window形式使用js
Posted 北方阿木
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了导出excel表-window形式使用js相关的知识,希望对你有一定的参考价值。
function daochu(){
var winname = window.open(‘‘, ‘_blank‘, ‘top=10000‘);
var yemei = document.getElementById("yemei");
yemei.style.display = "";
var cDeptName = document.getElementById("cDeptName");
cDeptName.style.display = "";
var strhtml = document.all.tableExcel.innerHTML;
winname.document.open(‘text/html‘, ‘replace‘);
winname.document.writeln(strHTML);
var tabb = document.getElementById("tabb");
tabb.style.display = "";
winname.document.execCommand(‘saveas‘,‘‘,‘信访情况报表导出.xls‘);
winname.close();
yemei.style.display = "none";
cDeptName.style.display = "none";
tabb.style.display = "none";
//window.open("/jsp/module/xinfang/report/xf_xfqkjbb_down.jsp?type="+‘<%=type%>‘+"&type="+‘<%=deptId%>‘+"&ssDate="+‘<%=ssDate%>‘+"&seDate="+‘<%=seDate%>‘+"&yf="+‘<%=yf%>‘+"&jd="+‘<%=jd%>‘+"&shrink="+‘<%=shrink%>‘+"&nd="+‘<%=nd%>‘);
以上是关于导出excel表-window形式使用js的主要内容,如果未能解决你的问题,请参考以下文章