我在 json 中得到响应,但这不会解析 json 响应。我做错了什么?我在文档http://docs.jquery.com/Plugins/Autocomplete上找不到任何东西
$("#users-allowed").autocomplete("/people/following.json", {
width: 320,
//max: 4,
highlight: false,
scroll: true,
scrollHeight: 300,
formatItem: function(response, i, max) {
console.log(response);
console.log(response['items']);
console.log(response.items);
return i + "/" + max + ": \"" + response.status_code + "\" [" + response.status_description + "]";
//return "<img src='images/" + value + "'/> " + value.split(".")[0];
},
formatResult: function(response) {
//return value.split(".")[0];
return response.status_description;
}
});