var warninfo = new Batchinfo ();
Click the Back button, query pop-up window disappears, add pop-up window appears
$ (". Search_cancel2"). Click (function () {
var allcheckedb = $ ("body. Demo_contenta2 Tr:has (input:checked)");
var allcheckedb =$ ("body. Demo_contenta2 tr[id!= ' Nocc ']:has (input:checked)");
for (var a = 0; a < allcheckedb.length; a++) {
var Allcheckedc = $ (allcheckedb[a]);
for (var b = 0; b < WarnInfo.id.length; b++) {
if (allcheckedc.attr (' data-id ') = = Warninfo.id[b]) {
var index =$.inarray (Warninfo.id[b], warninfo.id);//Gets the index of a value in the array
WarnInfo.id.splice (index, 1);
WarnInfo.code.splice (index, 1);
WarnInfo.name.splice (index, 1);
WarnInfo.unit.splice (index, 1);
WarnInfo.inventory.splice (index, 1);
WarnInfo.xia.splice (index, 1);
Warninfo.numberone (index,1);
}
}
WarnInfo.id.push (allcheckedc.attr ("Data-id"));
WarnInfo.code.push (Allcheckedc.find ("Td:eq (2)"). html ());
WarnInfo.name.push (Allcheckedc.find ("Td:eq (3)"). html ());
WarnInfo.unit.push (Allcheckedc.find ("Td:eq (4)"). html ());
WarnInfo.inventory.push (allcheckedc.attr ("data-inventory"));
WarnInfo.numberOne.push (allcheckedc.attr ("Data-number"));
WarnInfo.xia.push ("Please enter");
}
The For loop determines the duplicate content, then gets its index in the array, and the array goes heavy.
Using $.inarray, the array is used to weigh