0
我試圖從它的網站重新jQuery的自動完成功能例如:JQuery的自動完成故障
source: function(request, response) {
$.getJSON("search.php", {
term: extractLast(request.term)
}, response);
},
要:
http://jqueryui.com/autocomplete/#multiple-remote
我改變的唯一事情是我從改變源屬性:
source: function (request, response) {
$.ajax({
type: "POST",
url: "/UIClientsWebService.asmx/SearchCRMUsers",
data: "{term:'" + extractLast(request.term) + "'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (result) {
$("#commentBody").autocomplete("option", "source", result.d);
}
}, response);
},
現在問題是自動完成只是爲杉木工作st','。當我選擇我的第一個項目,然後當我想搜索並選擇第二個項目時,什麼也沒有發生。我的螢火蟲沒有錯誤。我可以看到搜索方法調用,但源代碼不會更改,也不會顯示爲我的自動完成項目。我可以看到我的搜索字詞正確更改,但實際上沒有發生搜索。
非常感謝,其實什麼使它的工作原理是響應(數據)線,沒有必要添加多個:真實的,但無論如何你救了我:) – Mazdak