Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
RishiRecon
GitHub Repository: RishiRecon/exploits
Path: blob/main/js/search.js
27877 views
1
// JavaScript code
2
function search_animal() {
3
let input = document.getElementById("searchbar").value;
4
input = input.toLowerCase();
5
let x = document.getElementsByClassName("animals");
6
7
for (i = 0; i < x.length; i++) {
8
if (!x[i].innerHTML.toLowerCase().includes(input)) {
9
x[i].style.display = "none";
10
} else {
11
x[i].style.display = "block";
12
}
13
}
14
}
15
16