在官方文档页面后,我发现下面的代码http://jqueryui.com/autocomplete/#remotejQuery的自动完成...调用一个函数完成AJAX
$("#birds").autocomplete({
source: "search.json",
minLength: 2,
select: function(event, ui) {
log(ui.item ?
"Selected: " + ui.item.value + " aka " + ui.item.id :
"Nothing selected, input was " + this.value);
}
});
我需要的是AJAX调用到search.json作出后,我需要存储返回json数据从一个变量中的远程调用,然后调用一个函数。怎么做?谢谢。
请阅读文档的http:// api.jqueryui.com/autocomplete/#event-response – mplungjan 2014-12-01 21:18:41
它的返回对象...当我cosole.log(ui)..its空...我需要整个JSON我ñ变量 – 2014-12-01 21:33:26