【发布时间】:2011-04-26 12:59:42
【问题描述】:
我正在使用带有 ajax 的 jquery ui 自动完成,这是我使用 firebug 得到的 json 响应
[{"value":" test","url":"\/social\/profile\/46","label":" test"},
{"value":" test","url":"\/social\/profile\/47","label":" test"},
{"value":"test tset","url":"\/social\/profile\/62","label":"test tset"},
{"value":"test test","url":"\/social\/profile\/126","label":"test test"}]
这是代码
// Using jQuery UI's autocomplete widget:
$('#term').autocomplete({
minLength : 4,
source : rootPath+'/search',
select: function(event, ui)
{
window.location = ui.item.url;
}
});
我正在获取自动完成列表
【问题讨论】:
标签: jquery jquery-ui jquery-ui-autocomplete