[英]Fire a javascript event when textbox is autocomplete?
I need to enable a button when a textbox is filled. 填充文本框后,我需要启用一个按钮。 However no javascript event is fired when you fill the textbox using the browser autocomplete function, so I need a way to catch this "event".
但是,当您使用浏览器自动完成功能填充文本框时,不会触发任何javascript事件,因此我需要一种方法来捕获此“事件”。 I tryed many javascript events like change focus but they aren't fired when you select and option in the autocomplete "combo".
我尝试了许多JavaScript事件,例如更改 焦点,但是当您在自动完成“组合”中选择和选项时,它们并未触发。
$('#mytextbox').on('change', function(){
$('#mybutton').removeAttr('disbled');
});
Have you try to use jquery ui autocomplete ? 您是否尝试过使用jQuery ui autocomplete?
http://jqueryui.com/autocomplete/#combobox http://jqueryui.com/autocomplete/#combobox
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.