const INPUT = document.getElementById('textInput');
INPUT.addEventListener('change', (e) => {
// CODE
});
const INPUT = document.getElementById('textInput');
INPUT.onchange = (e) => {
// CODE
};
funcition someFunc() {
// CODE
}
<input type="text" onchange="someFunc()">