<div class="wrap">
<table id="js-table" class="table table-bordered">
<thead>
<tr>
<th>ID</th>
<th>項目1</th>
<th>項目2</th>
<th>期間</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>ABC</td>
<td>BCD</td>
<td>11</td>
<td>編集</td>
</tr>
<tr>
<td>2</td>
<td>BCD</td>
<td>CDF</td>
<td>50</td>
<td>編集</td>
</tr>
<tr>
<td>3</td>
<td>CDF</td>
<td>DFE</td>
<td>20</td>
<td>編集</td>
</tr>
<tr>
<td>4</td>
<td>DFE</td>
<td>ABC</td>
<td>10</td>
<td>編集</td>
</tr>
</tbody>
</table>
</div
jQuery(function($){
$("#js-table").DataTable({
lengthChange: false,
displayLength: 15,
bAutoWidth: false,
columnDefs: [
{ targets: 4, bSortable: false },
{ targets: 4, searchable: false }
],
oLanguage: {
sLengthMenu: "表示行数 _MENU_ 件",
sZeroRecords: "データはありません。",
oPaginate: {
sNext: "次のページ",
sPrevious: "前のページ"
},
sInfo: "全_TOTAL_件中 _START_件から_END_件を表示",
sInfoEmpty: "",
sInfoFiltered: "(全 _MAX_ 件)",
sInfoPostFix: "",
sSearch: "検索:"
}
});
});