[英]Tab out of asp.net auto complete textbox after user selects an item (using enter or mouse click)
我正在使用asp.net自動完成文本框,並且一切正常。 用戶選擇一個項目后,我只需要在該文本框中跳出標簽即可(通過使用Enter或鼠標單擊其中一個項目)
嘗試這個
$('input').autocomplete({
autoFocus: true,
source: ["test","some text"],
delay: 0,
select: function(event, ui) { if (event.keyCode == 13) {
$(this).next("input").focus().select();
} }
});
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.