GlobalEventHandlers.oninput

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.

Обработчик события input в окне. Событие ввода возникает при изменении значения элемента <input>.

Это событие пузырится. Если он поддерживается в окне, он поддерживается и в <input>.

Example

html
<script>
  window.addEventListener(
    "input",
    function (e) {
      console.log("input event detected! coming from this element:", e.target);
    },
    false,
  );
</script>

<input placeholder="type here and see console." />

Спецификации

Specification
UI Events
# event-type-input
HTML
# handler-oninput

Совместимость с браузерами

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
input event

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Partial support
Partial support
Has more compatibility info.

Смотрите также