📅  最后修改于: 2022-03-11 14:54:26.436000             🧑  作者: Mango
// Jquery searching in table TD TR without DB (Front-end)
$("#clientSearch").keyup(function() {
var value = this.value.toLowerCase().trim();
$("table tr").each(function (index) {
if (!index) return;
$(this).find("td").each(function () {
var id = $(this).text().toLowerCase().trim();
var not_found = (id.indexOf(value) == -1);
$(this).closest('tr').toggle(!not_found);
return not_found;
});
});
});