※ [本文转录自 Web_Design 看板 #1WRi-oWF ]
作者: lueichun (= =) 看板: Web_Design
标题: [问题] 如何在JQuery dataTable的列添加删除钮
时间: Thu Apr 8 17:41:04 2021
我现在有写了以下的jQuery dataTable code:
<script>
var myTable = $('#messageTable').DataTable({
"order": [[ 3, "desc" ]],
"columnDefs": [ { type: 'date', 'targets': [3] } ],
"columns" : [ {
"title" : "id",
"data" : "id",
width:'10%'
}, {
"title" : "留言者姓名",
"data" : "name",
width:'20%'
}, {
"title" : "留言",
"data" : "messageStr",
width:'50%'
},{
"title" : "留言日期",
"data" : "addDate",
width:'20%'
} ]
});
</script>