我的问题很清楚。
我正在使用 jquery 自动完成,但我不知道为什么它只显示消息:
9 results are available, use up and down arrow keys to navigate.
没有向我显示结果列表。
这是我的代码:
<p class="select-c">
<label for="fcb">Location</label>
<input id="fcb" name="fcb" type="text">
</p>
$("#fcb").autocomplete({
source: function (request, response) {
$.ajax({
type: "GET",
dataType: 'json',
url: "../ws/city/" + request.term,
async: true,
success: function( data ) {
response( $.map( data, function( item,key ) {
return {
label: key,
value: item.id_town+"#"+item.id_province
}
}));
},
error: function (result) {
alert("Due to unexpected errors we were unable to load data");
}
});
},
minLength: 2
});
结果如下:
可能是什么问题呢??