最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - JQuery binding events with propertychange and DomAttrModified - Stack Overflow

programmeradmin4浏览0评论

I am working on an application and i have use a property where a small change in textarea should alert the user, i tried onChange events, but that does not server the Purpose, i found onPropertyChange seems to be working fine in IE only, i had to make this application cross browser was looking something like an attribute of onpropertychange with other browsers. Looked at DomAttrModified, but that seems not working any idea, how can i do: Here is my below code:

$("#info").bind('keyup keydown keypress onDOMAttrModified propertychange', function(evt)
    { var keyCode = evt.which; 
        var text_area =$(this).val(); 
    } 
});

I am working on an application and i have use a property where a small change in textarea should alert the user, i tried onChange events, but that does not server the Purpose, i found onPropertyChange seems to be working fine in IE only, i had to make this application cross browser was looking something like an attribute of onpropertychange with other browsers. Looked at DomAttrModified, but that seems not working any idea, how can i do: Here is my below code:

$("#info").bind('keyup keydown keypress onDOMAttrModified propertychange', function(evt)
    { var keyCode = evt.which; 
        var text_area =$(this).val(); 
    } 
});
Share Improve this question edited Aug 18, 2013 at 8:01 Tushar Gupta - curioustushar 57.1k24 gold badges105 silver badges109 bronze badges asked Aug 18, 2013 at 7:56 RegualRegual 3771 gold badge5 silver badges21 bronze badges 2
  • 2 Don't prepend "on". Just use DOMAttrModified – Ian Commented Aug 18, 2013 at 7:58
  • Although I'm confused why onchange doesn't work for you. Maybe you're looking for oninput? – Ian Commented Aug 18, 2013 at 7:59
Add a ment  | 

1 Answer 1

Reset to default 3

try

replace onDOMAttrModified with DOMAttrModified

$("#info").bind('keyup keydown keypress DOMAttrModified propertychange',
发布评论

评论列表(0)

  1. 暂无评论