Horje
Cycle through a list to see if there is a match for the characters entered into an input box Code Example
Cycle through a list to see if there is a match for the characters entered into an input box
const menu_items = document.querySelectorAll('li');

function getInputValue() {
    // Selecting the input element and get its value 
    var inputVal = document.getElementById("myInput").value;
    menu_items.forEach(item => {
        if (item.textContent.includes(inputVal)) {
            console.log(inputVal + " is in the list.")
        }
    })
}




Javascript

Related
bot react message with custom emoji Code Example bot react message with custom emoji Code Example
how to move an array over one Code Example how to move an array over one Code Example
javascript block link action Code Example javascript block link action Code Example
mdn golang Code Example mdn golang Code Example
array con doble javascript Code Example array con doble javascript Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9