Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

GlobalEventHandlers.oninput

概述

window对象上input事件的事件句柄,当<input> 元素的value属性值由输入设备改变时,就会触发input事件。

该事件是冒泡的,如果window对象支持该事件, <input>文本框元素同样也支持。

例子

<script>

window.addEventListener('input',function(e){
 console.log("检测到input事件!来自这个元素:", e.target);
}, false);

</script>

<input placeholder="disabled">

浏览器兼容性

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support (Yes) 2 9 10 (Yes)
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support ? ? ? ? (Yes)

相关链接

规范

HTML - Common input elements APIs

文档标签和贡献者

 此页面的贡献者: teoli, _Coin, khalid32, ziyunfei
 最后编辑者: teoli,