アプリケーションで jquery.autocomplet.js プラグインを使用していますが、オートコンプリート リストから結果を選択するために上下の矢印キーを使用できないため、同じ問題に直面しています。問題を解決するために何ができますか。前もって感謝します
これは私のコードです
$("#CityName").autocomplete({
source: function(request, response) {
$.ajax({
type: "Get",
url: "../api/Bind/GetCities?autoCompleteText=" + request.term,
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(data) {
response($.map(data, function(item) {
return {
id: item.SuggestionID,
value: item.SuggestionName
};
}));
}
});
},
select: function(event, ui) {
getStateZip(ui.item.id);
$("#CityName")[0].defaultValue = ui.item.value;
isSelected = true;
}