<table id="datatable-buttons" class="table table-striped table-bordered">
<thead>
<tr>
<th hidden>ID</th>
<th>Full Name</th>
<th>Age</th>
<th>Address</th>
<th>Action</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
$(document).ready(function(){ retrieve_user() });
当我从数据库中检索数据时,未显示功能。如果我从数据表功能单击导出按钮,它不会显示数据
function retrieve_user(){
$.ajax({
url:'../conn/callFunc.php',
method:'POST',
data:{
_trans:'retrieve_user'
},
success:function(msg){
$(function () {
$('#datatable-buttons').DataTable();
})
$("#datatable-buttons tbody").html(msg);
}
})
}
</script>