笔记:防止自己忘了
行: <th><input type="checkbox" name="all" id="all" /></th>
行的值 :{
data : function(e){
return "<input type='checkbox' name='checkids' id='checkids' value='"+e.id+"'/>";
}
},
方法: $('#appTable tbody').on('click', 'tr', function () {
/* var data = table.row( this ).data();
alert( 'You clicked on '+data[0]+'\'s row' ); */
var input = $(this).find("input");
//alert($(input).prop("checked"));
if (!$(input).prop("checked")) {
$(input).prop("checked",true);
}else{
$(input).prop("checked",false);
}
} );
借鉴地址:https://blog.youkuaiyun.com/QQ459932400/article/details/79003521