jQuery导出excel,pdf,CSV表格插件制作日程事件表格点击按钮一键导出excel表格文件、pdf文件、CSV表格效果,支持网页打印代码。
使用方法
在页面引入以下JS文件
<script src="js/jquery.min.js"></script> <script src="js/jquery.datatables.min.js"></script> <script src="js/dataTables.buttons.min.js"></script> <script src="js/jszip.min.js"></script> <script src="js/buttons.html5.min.js"></script> <script src="js/buttons.flash.min.js"></script> <script src="js/pdfmake.min.js"></script> <script src="js/vfs_fonts.js"></script> <script src="js/buttons.print.min.js"></script>
HTML结构
<table id="example" class="display" role="grid" aria-describedby="example_info"> <thead> <tr> <th>事件ID</th> <th>员工ID</th> <th>标题</th> <th>URL</th> <th>开始时间</th> </tr> </thead> <tbody> </tbody> <tfoot> <tr> <th>事件ID</th> <th>员工ID</th> <th>标题</th> <th>URL</th> <th>开始时间</th> </tr> </tfoot> </table>