ajax 内的自动完成功能不起作用...帮助
$.ajax({
url: 'url',
type: 'GET',
dataType :'jsonp',
async: false,
crossDomain:true,
success: function(data) {
var resp = data.response;
var availableTags="[";
for (i = 0; i <= 10; i++) {
var postSub = resp.messages.message[i].subject.$;
if (i < 10) {
availableTags += postSub + ",";
}
else {
availableTags += postSub;
}
}
availableTags += "]";
$("#tags").autocomplete({
source: availableTags
});
}
});