var checkedarr=[];table.on('checkbox(demo)', function(obj){if (obj.type=='all') 。
输入代码:
return;if (obj.checked){checkedarr.push(obj.data.lay_table_index); //checkedarr[obj.data.id] = obj.data.lay_tableindex}else{delete checkedarr[obj.data.lay_table_inde //delete checkedarr[obj.data.id。
相关推荐:《layui框架教程》
得到table选中行内容,得到删除需要的唯一值,一般是id。
将所要删除的项加入到数组中。
判断是否选中,发送ajax请求,并附带参数id即可。
以上就是layui表格怎么清空的详细内容。
