简体   繁体   中英

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". I tryed many javascript events like change focus but they aren't fired when you select and option in the autocomplete "combo".

$('#mytextbox').on('change', function(){
   $('#mybutton').removeAttr('disbled');
});

Have you try to use jquery ui autocomplete ?

http://jqueryui.com/autocomplete/#combobox

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM