// LOANS function searchLoans() { const searchInput = document.querySelector('.search-input').value.toLowerCase(); const tableRows = document.querySelectorAll('#loansTableBody tr'); tableRows.forEach(row => { const loanid = row.cells[0].textContent.toLowerCase(); const bookid = row.cells[1].textContent.toLowerCase(); const copyid = row.cells[2].textContent.toLowerCase(); if (loanid.includes(searchInput) || bookid.includes(searchInput) || copyid.includes(searchInput)) { row.style.display = ''; } else { row.style.display = 'none'; } }); document.querySelector('.search-input').addEventListener('keyup', searchLoans); }