我正在尝试使用jquery自动完成。它不能正常工作它每次只显示一个选项我不知道为什么我得到这个。
代码
var options_df1 = {
serviceUrl: '/'+company+'/city_names.html',
width: 230,
minChars: 1,
maxHeight: 500,
delimiter: /(,|;)\s*/,
onSelect: onAutocompleteSelect_df1,
deferRequestBy: 0, //miliseconds
params:{country: 'Yes'},
};
var onAutocompleteSelect_df1 = function(value_df, data_df) {
startlocation_df = data_df;
}
答案 0 :(得分:0)
我希望问题是因为缓存使用此代码。使用noCache属性
var options_df1 = {
serviceUrl: '/'+company+'/city_names.html',
width: 230,
minChars: 1,
maxHeight: 500,
delimiter: /(,|;)\s*/,
onSelect: onAutocompleteSelect_df1,
deferRequestBy: 0, //miliseconds
params:{country: 'Yes'},
noCache: false //set to true, to disable caching
};