我在一个网页中显示了多个表格,由以下代码初始化:
/* Tables initialisation */
$(document).ready(function() {
$('.dataTable').dataTable({
"sDom": "<'row-fluid'<'span6'l><'span6'f>r>t<'row-fluid'<'span3'T><'span3'i><'span6'p>>",
"sPaginationType": "bootstrap",
"bStateSave": true,
"oLanguage": {
"sLengthMenu": "_MENU_ records per page"
},
"oTableTools": {
"sSwfPath": "http://cdnjs.cloudflare.com/ajax/libs/datatables-tabletools/2.1.4/swf/copy_csv_xls_pdf.swf",
"aButtons": [ "copy", "csv", "xls", "pdf", "print" ]
}
});
});
Chrome或Safari都没有javascript错误,但是当点击任何按钮时,它都无法正常工作。请帮我调试/弄清楚出了什么问题!
答案 0 :(得分:0)
永不心!显然它现在正在工作,它总是这样。我在阅读这篇文章后意识到这一点:http://datatables.net/forums/discussion/15605/even-tabletool-examples-are-not-working:)