In JavaScript, the input event fires when the value of an <input>, <textarea>, or <select> changes as a direct result of a user action (MDN). It also applies to contenteditable and designMode.
Register a listener with addEventListener. Check readiness and browser support before you rely on this event.
inputType. Describes the edit (insert, delete, …).
data. Characters inserted, or null for some edits.
Other controls. Checkbox/select may give a plain Event — guard optional fields.
Compatibility
Browser Support
Element input is Baseline Widely available (MDN: since January 2020). Safe for live form UIs in modern evergreen browsers.
✓ Baseline · Widely available
Element input
User-driven value-change event for form controls and editable hosts.
99%Widely available
Google ChromeSupported · Desktop & Mobile
Full support
Mozilla FirefoxSupported · Desktop & Mobile
Full support
Apple SafariSupported · macOS & iOS
Full support
Microsoft EdgeSupported · Chromium
Full support
Internet ExplorerNo native support · Use a polyfill
Polyfill
OperaSupported · Modern versions
Full support
Samsung InternetSupported · Android
Full support
Android WebViewSupported · Modern WebView
Full support
inputBaseline
Bottom line: Default choice for live typing UI. Use change for committed values, and beforeinput when you need to cancel an edit.
Frequently Asked Questions
It fires when the value of an input, textarea, or select changes as a direct result of a user action (MDN). It also applies to contenteditable hosts and documents with designMode on.
No. MDN marks Element input as Baseline Widely available (since January 2020). It is not Deprecated, Experimental, or Non-standard.
For text-accepting input and textarea controls, the interface is InputEvent. For other controls, it may be a plain Event (MDN).
input fires as the value changes (for example each keystroke). change fires when the value is committed — such as when a text control loses focus or a selection is finalized.
beforeinput fires before the DOM value changes (often cancelable). input fires after the value has already changed.
No. Setting element.value in script does not fire input. Only user-driven changes (and some browser UI actions like autofill) are expected to (MDN).