detect any change to input element vanilla code example
Example: js vanilla detect any input
document.onkeypress = function (e) {
e = e || window.event;
// use e.keyCode
};
document.onkeypress = function (e) {
e = e || window.event;
// use e.keyCode
};