Teste busca Leis

Legislação – Leis

const searchInput = document.getElementById(‘searchInput’);
const itemList = document.getElementById(‘itemList’).getElementsByTagName(‘li’);

searchInput.addEventListener(‘input’, function() {
const searchTerm = searchInput.value.toLowerCase();

for (let i = 0; i < itemList.length; i++) {
const itemText = itemList[i].textContent.toLowerCase();
if (itemText.includes(searchTerm)) {
itemList[i].style.display = 'block';
} else {
itemList[i].style.display = 'none';
}
}
});

Governo na palma da mão

Pular para o conteúdo