欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

JQUERY绑定propertychange事件无效

JavaScript code
 
?
1
2
3
$("#tb_shortName").bind("propertychange"function () { alert("i m change"); });
$("body").on("propertychange""#tb_shortName"function () { alert("i m change"); });
$("body").on("blur""#tb_usePeople"function () { $("#tb_shortName").val("111"); });

怎么绑都不好用, 但是绑定了blur事件就好用, 而且onpropertychange事件写在html input标签中也是好用的.
我是在IE浏览器下测试的.
求大神解答嗷.
JavaScript code
 
?
1
2
$("#tb_shortName").attr("onpropertychange""ValChange()");
var ValChange = function () { alert("i m change"); }

居然这样都可以 - -#
为什么这么没节操.

可以像下面这样用

$("body").on("propertychange input""#tb_shortName"function () { alert("i m change"); });

来自 http://bbs.csdn.net/topics/390704952
普通分类: