我尝试添加一些“导出”按钮,但其中任何一个都会出现在屏幕上。
CSS 链接:
<link href="/Datatable/media/css/jquery.dataTables.css" rel="stylesheet" type="text/css" />
<link href="/Datatable/media/css/jquery.dataTables_themeroller.css" rel="stylesheet" type="text/css" />
<link href="/Datatable/media/css/demo_table_jui.css" rel="stylesheet" type="text/css" />
<link href="/Datatable/media/css/demo_table.css" rel="stylesheet" type="text/css" />
<link href="/Datatable/media/css/demo_page.css" rel="stylesheet" type="text/css" />
<link href="/Datatable/extras/TableTools/media/css/TableTools.css" rel="stylesheet" type="text/css" />
<link href="/Datatable/extras/TableTools/media/css/TableTools_JUI.css" rel="stylesheet" type="text/css" />
<link href="http://datatables.net/media/css/jui_themes/pepper-grinder/jquery-ui-1.7.2.custom.css " rel="stylesheet" type="text/css" />
JS 链接:
<script type="text/javascript" src="/Datatable/media/js/jquery.js"></script>
<script type="text/javascript" src="/Datatable/media/js/jquery.dataTables.js"></script>
<script type="text/javascript" src="/Datatable/extras/TableTools/media/js/TableTools.js"></script>
<script type="text/javascript" src="/Datatable/extras/TableTools/media/js/TableTools.min.js"></script>
<script type="text/javascript" src="/Datatable/extras/TableTools/media/js/ZeroClipboard.js"></script>
<script type="text/javascript" src="/Datatable/media/js/jquery.dataTables.columnFilter.js"></script>
<script type="text/javascript" src="/Datatable/media/js/jquery.dataTables.min.js"></script>
jQuery代码:
$(document).ready(function () {
$('#myTable').dataTable({
"sScrollY": "700px",
"bJQueryUI": true,
"bScrollCollapse": true,
"sPaginationType": "full_numbers",
"iDisplayLength": 50
}, {
"aoColumns": [null, null, null, null, null, null, null, {
"sType": "currency-pre"
}]
}, {
"sDom": '<"H"Tfr>t<"F"ip>',
"oTableTools": {
"sSwfPath": "http://datatables.net/release-datatables/extras/TableTools/media/swf/copy_csv_xls_pdf.swf",
"aButtons": ["copy", "print"]
}
}).columnFilter();
});
我不明白我做错了什么......