cssjs-func-lib/tablefilter.js
2023-09-03 11:27:12 +02:00

16 lines
441 B
JavaScript

function myFilter() {
var input, filter, ul, li, a, i, txtValue;
input = document.getElementById("suchstr");
filter = input.value.toUpperCase();
li = document.querySelectorAll("#suchlist .row");
for (i = 0; i < li.length; i++) {
txtValue = li[i].textContent || li[i].innerText;
if (txtValue.toUpperCase().indexOf(filter) > -1) {
li[i].style.display = "";
} else {
li[i].style.display = "none";
}
}
}