onInput
OnInput refers to the HTML oninput attribute and the input event in web development. The input event fires when the value of an input, textarea, or other editable element changes as a result of user input. It also applies to contenteditable elements in many cases. The oninput attribute is a way to attach a handler directly in the markup.
In contrast to the change event, which typically fires when a control loses focus after its value
Common uses include live form validation, character counters, and live search suggestions. The event object is
HTML: <input id="field" oninput="handleInput(this.value)">
JavaScript: document.getElementById('field').addEventListener('input', function(e) { console.log(e.target.value); });
Compatibility: oninput is supported by all modern browsers and many legacy browsers. If you need to support