propertychange input change
IE678 支持propertychange事件,可以监听所有属性(包括自定义属性)的改变事件,包括手动修改输入框文本以及js修改输入框文本。
propertychange事件有个特点就是不支持冒泡,这样就不能实现事件的委托,而且jquery也没有解决这个BUG,所以下面的代码是有问题的:
$("#container").on("propertychange", "input", func);
因为IE9开始支持addEventListener,而且还兼容attachEvent,所以其实IE9也是支持propertychange事件的,只不过只能使用attachEvent来注册事件。
而jquery内部应该是使用addEventListener注册事件的,导致jquery的on()方法在IE9下面注册propertychange事件无效。
IE9+,其他现代浏览器支持input事件,用来监听输入框文本内容的改变,且不需要失去焦点就可以触发。
change事件则是需要失去焦点才会触发,所有浏览器都支持该事件。
其中input事件和change事件都不能监听js操作的修改。
对于IE9+和firefox以及Opera浏览器,支持DOMAttrModified事件,和propertychange事件很相似,监听属性的变化,但是不监听用户操作的修改。
参考:
propertychange event
IE9的一个BUG:propertychange和input事件在拖拽 / 剪切 / 删除时无法触发
IE神奇小bug一则
propertychange input change的更多相关文章
- js & input event & input change event
js & input event & input change event vue & search & input change <input @click=& ...
- input change only trigger once bug
input change only trigger once bug clear first https://stackoverflow.com/a/11280934/5934465 upload E ...
- change,propertychange,input事件小议
github上关于mootools一个issue的讨论很有意思,所以就想测试记录下.感兴趣的可以点击原页面看看. 这个问题来自IE(LTE8)中对checkbox和radio change事件的实现问 ...
- jquery input change事件
input输入框的change事件,要在input失去焦点的时候才会触发 $('input[name=myInput]').change(function() { ... }); 在输入框内容变化的时 ...
- 页面加载后的input change事件 1或2个框 ajax
数据层没有,js和bll直接链接,数据层用的hqew. js: window.onload = function () { //型号input 改变 事件 $("#typeofproduct ...
- Query插件之ajaxFileUpload使用方法——input.change()事件的时候实现文件上传
点击下载 这是HTML <input id="uploadedfile" name="uploadedfile" type="file" ...
- 如何触发react input change事件
页面用react来进行开发的,想触发react组件里面input的change事件,用Jquery的trigger来触发没有效果,必须使用原生的事件来进行触发. var event = new Eve ...
- jQuery input -> file change事件bug
由jQuery绑定类型为file的input控件的change事件,发现只能被触发一次,修改方法 --> 原始代码: $input.change(function() { // somethin ...
- onchange监听input值变化及input隐藏后change事件不触发的原因与解决方法(设置readonly后onchange不起作用的解决方案)
转自:https://www.cnblogs.com/white0710/p/7338456.html 1. onchange事件监听input值变化的使用方法: <input id=" ...
随机推荐
- C++ STL的各种实现版本
ANSI/ISO的C++ STL规范版本正式通过以后,各个C++编译器厂商就可以依照标准所描述的原型去实现C++ STL泛型库,于是出现多种符合标准接口,但具体实现代码不同的泛型库,主要有: HP S ...
- Hadoop环境搭建-入门伪分布式配置(Mac OS,0.21.0,Eclipse 3.6)
http://www.linuxidc.com/Linux/2012-10/71900p2.htm http://andy-ghg.iteye.com/blog/1165453 为Mac的MyEcli ...
- 【POJ】2513 Colored Sticks
字典树+并查集. #include <cstdio> #include <cstring> #include <cstdlib> #define MAXN 5000 ...
- 构造函数语义学之Copy Constructor构建操作(1)
一.Copy Constructor的构建操作 就像 default constructor 一样,如果class没有申明一个 copy constructor,就会隐含的声明或隐含的定义一个.生成的 ...
- Apache HTTP Server mod_session_dbd 远程安全漏洞(CVE-2013-2249)
漏洞版本: Apache 2.4.2 漏洞描述: BUGTRAQ ID: 61379 CVE(CAN) ID: CVE-2013-2249 Apache HTTP Server是开源HTTP服务器. ...
- ♫【Backbone】this
Backbone.js Event Binding MyView = Backbone.View.extend({ events: { 'click .item': 'handleClick' }, ...
- 使用ChineseLunisolarCalendar 对象由年份获得生肖名,Datetime.now.tostring获得星期几
一:使用ChineseLunisolarCalendar 对象由年份获得生肖名,截图 二:代码 using System; using System.Collections.Generic; usin ...
- 服务器之间免密码ssh登陆
配置服务器f1(192.168.1.1)与服务器f2(192.168.1.2)之间免密码ssh登陆 一.首先,配置服务器主机名为f1.f2 1.更改/etc/sysconfig下的network文件, ...
- bzoj 1070 [SCOI2007]修车(最小费用最大流)
1070: [SCOI2007]修车 Time Limit: 1 Sec Memory Limit: 162 MBSubmit: 3515 Solved: 1411[Submit][Status] ...
- POJ3617 Best Cow Line
其实是学习参考了算法书的代码,但仍然是我自己写的,有小差别.贪心类型. #include <iostream> using namespace std; int main() { int ...