"自動分頁、搜尋表格"
Bootstrap 3.3.0 Snippet by Arashi

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<script type="text/javascript" charset="utf8" src="http://cdn.datatables.net/1.10.12/js/jquery.dataTables.js"></script>
<script src="https://cdn.datatables.net/1.10.12/js/dataTables.bootstrap.min.js"></script>
<div class="container">
<div class="row">
<h2>Create your snippet's HTML, CSS and Javascript in the editor tabs</h2>
<table class='table table-hover' id="myTable">
<thead>
<tr class="table-title-btm">
<th ></th>
<th ></th>
<th ></th>
<th ></th>
<th ></th>
</tr>
</thead>
<tbody>
<tr>
<td data-th="">#01312</td>
<td data-th="">2016-08-22</td>
<td data-th=""></td>
<td data-th="">NT$2580x5</td>
<td data-th=""><a class="btn btn-primary btn-block" href="order_detail"></a></td>
</tr>
<tr>
<td data-th="">#01346</td>
<td data-th="">2016-08-21</td>
<td data-th=""></td>
<td data-th="">NT$2580x5</td>
<td data-th=""><a class="btn btn-primary btn-block" href="#"></a></td>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
.dataTables_wrapper .dataTables_paginate .paginate_button {
padding: 0;
}
#myTable_filter, #myTable_paginate{
float: right;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
$(document).ready(function(){
$('#myTable').DataTable({
"order": [], //
"searching": true, //
language: {
"sProcessing": "...",
"sLengthMenu": " _MENU_ ",
"sZeroRecords": "",
"sInfo": " _START_ _END_ _TOTAL_ ",
"sInfoEmpty": " 0 0 0 ",
"sInfoFiltered": "( _MAX_ )",
"sInfoPostFix": "",
"sSearch": ":",
"sUrl": "",
"sEmptyTable": "",
"sLoadingRecords": "...",
"sInfoThousands": ",",
"oPaginate": {
"sFirst": "",
"sPrevious": "",
"sNext": "",
"sLast": ""
},
"oAria": {
"sSortAscending": ": ",
"sSortDescending": ": "
}
}
});
});
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: