working search bar html
<script>
function myFunction() {
// Declare variables
var input, filter,
ul, li, a, i, txtValue;
input = document.getElementById('myInput');
filter = input.value.toUpperCase();
ul =
document.getElementById("myUL");
li =
ul.getElementsByTagName('li');
// Loop through all
list items, and hide those who don't match the search query
for (i = 0; i <
li.length; i++) {
a = li[i].getElementsByTagName("a")[0];
txtValue = a.textContent || a.innerText;
if (txtValue.toUpperCase().indexOf(filter) > -1) {
li[i].style.display = "";
}
else {
li[i].style.display = "none";
}
}
}
</script>
Also in HTML:
- document.getElementByClassName("preview").innerHTML=src;
- how to put one div over another
- new line html
- ionic grid
- html center text
- input types html
- js html elements dom cheet sheet
- my html file shows code in browser
- text color html
- working search bar html
- best place to include script in html layout
- how to add lines between div rows html
- bootstrap 4 icons
- html doctype
- smaller than small html
- ng bootstrap input
- html zeilenumbruch
- HTML5 Accesskey Attribute: you may not need JavaScript to add Keyboard Shortcuts
- embed youtube video auto height
- how to use icon in html
- vue lifecycle hooks
- electron reload html
- html send email
- ionic progress bar