Home  >  Article  >  Web Front-end  >  How to clear layui table

How to clear layui table

爱喝马黛茶的安东尼
爱喝马黛茶的安东尼Original
2019-07-11 11:13:3611812browse

How to clear layui table

Listen to checkbox events:

var checkedArr=[];
table.on('checkbox(demo)', function(obj){if (obj.type=='all') 。

How to clear layui table

Enter code:

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。

How to clear layui table

Related recommendations: "layui framework tutorial"

Get the content of the selected row in the table and get the unique value needed for deletion, usually the id.

How to clear layui table

Add the item to be deleted to the array.

How to clear layui table

To determine whether it is selected, send an ajax request with the parameter id.

How to clear layui table

The above is the detailed content of How to clear layui table. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn