javascript Backbone.js 文本更改事件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6673662/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-25 21:29:03 来源:igfitidea点击:
Backbone.js text change event
提问by Shawn Mclean
How do I trigger a change
event on textbox in a backbone view?
如何change
在主干视图中的文本框上触发事件?
I tried:
我试过:
events: {
"onChanged input.autocomplete": "update"
}
update
didn't get fired. I also tried change
.
update
没有被解雇。我也试过了change
。
What is the name of the event for textchange?
textchange 的事件名称是什么?
回答by Geoff Moller
This should work:
这应该有效:
events: {
"change input.autocomplete": "update"
}
- Is the selector (input.autocomplete) correct?
- Change fires on blur, not on keydown - does this agree with your requirement?
- 选择器(input.autocomplete)是否正确?
- 在模糊而不是按键上更改火灾 - 这是否符合您的要求?