This page was translated from English by the community. Learn more and join the MDN Web Docs community.
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 январь 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> |
Совместимость с браузерами
Enable JavaScript to view this browser compatibility table.
Смотрите также
- An HTML5 Browser maze, oninput support
- Fixing oninput in IE Using html5Widgets includes polyfill for IE6-8
- Mathias Bynens suggests binding to both input and keydown
- oninput event | dottoro has notes about bugginess in IE9
- Bug 312094 - Add support for <select oninput>