how to add event listener to all input fields in javascript code example
Example: javascript add event listener to all input
document
.querySelectorAll("input")
.forEach((elem) => elem.addEventListener("keyup", calculateSum));
document
.querySelectorAll("input")
.forEach((elem) => elem.addEventListener("keyup", calculateSum));