这其中用到一个jquery的插件table2excel
使用方法也很简单:
1 。 包含必要的文件
script>
2。 创建导出按钮
3。 给导出按钮添加事件
$(".table2excel").table2excel({ exclude: ".noExl", // 不想导出的行加上class='noExl'即可 name: "Excel Document Name", // excel文档名 filename: "myFileName" // excel文件名}); 完整的看下DEMO
jQuery Boilerplate script> script>
| This shouldn't get exported | This shouldn't get exported either |
| This Should get exported as a header | This should too |
| data1a | data1b |
| data2a | data2b |
| This footer spans 2 cells | |
| This shouldn't get exported | This shouldn't get exported either |
| This Should get exported as a header | This should too |
| data1a | data1b |
| data2a | data2b |
| This footer spans 2 cells | |
Copyright © 2019- harx.cn 版权所有
违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务