下载地址
https://github.com/kayalshri/tableExport.jquery.plugin
引用(导出excel格式)
<script type="text/javascript" src="tableExport.js">使用
<button id="export">导出</button>
<div id="datalist" >
//表格
</div>
<script>
$("#export").click(function () {
$('#datalist').tableExport({
type: 'excel', //导出的表格类型
escape: 'false',
fileName: 'excel表格名称', //导出的excel的表格名称
worksheetName:'excel内部的sheet名称', // 导出的excel表格每一个sheet的名称
ignoreColumn: '[1,2,3,4]' //要忽略的列数,哪一列不需要导出,就填进去(从0开始)
})
})
</script>
