我正在使用来自https://www.datatables.net/ 的数据表工具,打印工作正常,但保存和复制不起作用。这是我的JS 代码。
// datatables table tools
$('#datatablestools').dataTable({
"sDom": "<'row-fluid'<'span6'T><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>",
"oTableTools": {
"aButtons": [
"copy",
"print",
{
"sExtends": "collection",
"sButtonText": 'Save <span class="caret" />',
"aButtons": [
"xls",
"csv",
{
"sExtends": "pdf",
"sPdfOrientation": "landscape",
"sPdfMessage": "Your custom message would go here."
}
]
}
],
"sSwfPath": "js/datatables/swf/copy_csv_xls_pdf.swf"
}
});