This is my init code:
$(document).ready( function () {
$('#companies').dataTable( {
"sDom": 'T<"clear">lfrtip',
"oTableTools": {
"sRowSelect": "multi",
"aButtons": [ "select_all", "select_none" ]
}
} );
} );
This is my body code:
<body id="dt_example">
<div id="container">
<div id="demo_jui">
<table id="companies" class="display">
<thead>
<tr>
<th>Company name</th>
<th>Address</th>
<th>Town</th>
</tr>
</thead>
<tbody>
<tr>
<td>ABC</td>
<td>ABC Street</td>
<td>Town1</td>
</tr>
<tr>
<td>Dell</td>
<td>Car street</td>
<td>Town2</td>
</tr>
</tbody>
</table>
</div>
</div>
</body>
我不知道,这里有什么问题。我没有得到“全选”和“取消全选”按钮,我也无法选择单行。我已按照此链接中的示例进行操作:http: //datatables.net/release-datatables/extras/TableTools/select_multi.html。我是 Jquery 和 Datatables 插件的新手。请帮我解决这个问题。