当我试图将jquery-2.0.2.min.js包含在php页面中时,它隐藏了datatable的导出按钮

时间:2018-10-03 06:41:56

标签: javascript jquery html datatable export-to-excel

包括以下内容:

<script src="https://code.jquery.com/jquery-3.3.0.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://code.jquery.com/ui/1.12.0/jquery-ui.min.js"></script> 
<script src="https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"></script>
<script src="http://localhost/schoolwards_deliverable/server_upload_deliverable/adminpanel/table2excel.js" ></script>

数据表代码:

$('#res_tab').DataTable({
    "destroy": true,
    "aaData": arrayReturn,
    "columns": subAray,
    "responsive": true,
    "scrollX": true,
    paging: false,
    searching: false,
    dom: 'Bfrtip',
    buttons: [{
        extend: 'excel',
        title: '',
        filename: temp_name,
        text: ' Export',
        className: 'btn btn-info glyphicon glyphicon-export',
    }]
});

0 个答案:

没有答案