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

javascript - Backbone.js text change event - Stack Overflow

programmeradmin3浏览0评论

How do I trigger a change event on textbox in a backbone view?

I tried:

events: {
    "onChanged input.autoplete": "update"
}

update didn't get fired. I also tried change.

What is the name of the event for textchange?

How do I trigger a change event on textbox in a backbone view?

I tried:

events: {
    "onChanged input.autoplete": "update"
}

update didn't get fired. I also tried change.

What is the name of the event for textchange?

Share Improve this question asked Jul 13, 2011 at 3:12 Shawn McleanShawn Mclean 57.5k96 gold badges281 silver badges412 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 13

This should work:

events: {
    "change input.autoplete": "update"
}
  1. Is the selector (input.autoplete) correct?
  2. Change fires on blur, not on keydown - does this agree with your requirement?
发布评论

评论列表(0)

  1. 暂无评论