Itens ID'S
Scripts | Target | Cavebot| Healbot | Configs | Itens ID'S
<input type="text" id="searchInput" onkeyup="searchTable()" placeholder="Pesquisar por nome do item">
<thead> </thead> <tbody> </tbody>Item | ID |
---|---|
<script> function searchTable() {
// Declarações de variáveis var input, filter, table, tr, td, i, txtValue; input = document.getElementById("searchInput"); filter = input.value.toUpperCase(); table = document.getElementById("tabelaDPL"); tr = table.getElementsByTagName("tr");
// Loop através de todas as linhas da tabela e esconde as que não correspondem à pesquisa for (i = 0; i < tr.length; i++) { td = tr[i].getElementsByTagName("td")[0]; // Coluna com o nome do item if (td) { txtValue = td.textContent || td.innerText; if (txtValue.toUpperCase().indexOf(filter) > -1) { tr[i].style.display = ""; } else { tr[i].style.display = "none"; } } }
} </script>