首页 > 代码库 > 导出excel表-window形式使用js

导出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