简体   繁体   中英

Tab out of asp.net auto complete textbox after user selects an item (using enter or mouse click)

I am using asp.net auto complete textbox and everything is working fine. I just need to tab out of that textbox after user selects an item (either by using enter or mouse click on one of the items)

Try This

$('input').autocomplete({
autoFocus: true,
source: ["test","some text"],
delay: 0,
select: function(event, ui) { if (event.keyCode == 13) { 
   $(this).next("input").focus().select();
} }

});

http://jsfiddle.net/YbPVX/5/

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