Is there any way I can create a constant function that listens to an input, so when that input value changes, something is triggered immediately?
I am looking for so
Another approach in 2020 could be using document.querySelector():
document.querySelector()
const myInput = document.querySelector('input[name="exampleInput"]'); myInput.addEventListener("change", (e) => { // here we do something });