1st commit

This commit is contained in:
IM23a-bachmannj2
2024-09-11 12:32:01 +02:00
commit c51e60ed05
10 changed files with 1124 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
function filterTable() {
const input = document.getElementById('search');
const filter = input.value.toLowerCase();
const table = document.getElementById('gun-stats');
const tr = table.getElementsByTagName('tr');
for (let i = 1; i < tr.length; i++) {
const td = tr[i].getElementsByTagName('td')[1];
if (td) {
const txtValue = td.textContent || td.innerText;
if (txtValue.toLowerCase().indexOf(filter) > -1) {
tr[i].style.display = '';
} else {
tr[i].style.display = 'none';
}
}
}
}