window属性:oninput
oninput属性
oninput属性表示窗口中input事件的事件处理程序。input事件在<input>元素值更改时引发。
oninput属性示例
<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.">规范
| 规范 | 状态 | 注释 |
|---|---|---|
HTML Living Standard 在该规范中的'oninput'的定义。 | Living Standard | 初始定义 |
浏览器兼容性
我们正在将兼容性数据转换为机器可读的JSON格式。
- 电脑端
| 特征 | Chrome | Edge | Firefox(Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|---|
| 基本支持 | 支持 | 支持 | 支持:2 | 支持:9 | 支持:10 | 支持 |
- 移动端
| 特征 | Android | Android Webview | Edge | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile | Chrome for Android |
|---|---|---|---|---|---|---|---|---|
| 基本支持 | ? | 支持 | 支持 | ? | ? | ? | 支持 | 支持 |