function exportGrid(tableid,filename) {
var table= document.getElementById(tableid);
$("table tr td:last-child").replaceWith("");
var html = table.outerHTML;
var a = document.createElement('a');
a.id = 'ExcelDL';
a.href = 'data:application/vnd.ms-excel,' + escape(html);
a.download = filename + ".xls";
document.body.appendChild(a);
a.click();
// location.reload();
// document.getElementById('ExcelDL').remove();
}
我在 jSP 上有这个函数,我想导出一个带分页的表格,问题是,该函数只是导出贪婪的 View
最佳答案
关于javascript - 导出excel的功能,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48950295/