datatables一些特别的配置
{ "data": null,"defaultContent":"<input type='checkbox' name='checkList' />" },
效果:

$('#button').click(function(){
oTable.rows('.selected').remove().draw();
})
render:渲染(处理)数据显示在表格中,这个属性可以操作从数据源读取到的数据。
比如:
根据数据源的数据替换成超链接
$('#example').dataTable( {
"columnDefs": [ {
"targets": 0,
"data": "download_link",
"render": function ( data, type, full, meta ) {
return '<a href="'+data+'">Download</a>';
}
} ]
} );
参考资料:http://datatables.club/reference/option/columns.render

浙公网安备 33010602011771号