, .
HTML
<table id="example" class="display" cellspacing="0" width="100%">
<thead>
<tr>
<th>Name</th>
<th>Position</th>
<th>Office</th>
<th>Age</th>
<th>Start date</th>
<th>Salary</th>
</tr>
<tr>
<th><input type="checkbox"></th>
<th><input type="checkbox"></th>
<th><input type="checkbox"></th>
<th><input type="checkbox"></th>
<th><input type="checkbox"></th>
<th><input type="checkbox"></th>
</tr>
</thead>
</table>
JavaScript
var table = $('#example').DataTable({
'orderCellsTop': true,
'select': 'multi'
});
$('#example').on('change', 'thead input[type="checkbox"]', function(){
var colIdx = $(this).closest('th').index();
if(this.checked){
table.column(colIdx).select();
} else {
table.column(colIdx).deselect();
}
});
.
. jQuery DataTables: .