DataTables警告:表id = user-无法重新初始化DataTable。对于 有关此错误的更多信息,请参见 http://datatables.net/tn/3
<table id="user" class="table datatable-responsive-row-control">
<thead>
<tr>
<th>Username</th>
<th>Account</th>
<th>data CID</th>
<th>Type</th>
<?php if(!$this->session->userdata('type') == '0') { ?>
<th>Action</th>
<?php } ?>
</tr>
</thead>
<tbody>
</tbody>
</table>
$(document).ready(function(){ $('#user')。DataTable({
"processing": true,
"serverSide": true,
"ajax":{
"url": "<?php echo base_url('user/use_data') ?>",
"dataType": "json",
"type": "POST",
},
"columns": [
{ "data": "name" },
{ "data": "accountid" },
{ "data": "dataid" },
{ "data": "type" },
<?php if(!$this->session->userdata('type') == '0') { ?>
{ "data": "actions" },
<?php } ?>
]
});
});