【发布时间】:2014-02-27 18:46:33
【问题描述】:
我写了任何文本,它会显示与文本不匹配的结果。 无论我在字段中插入什么,select2 总是给出所有结果。
$("#UserCliente").select2({
minimumInputLength: 3,
ajax: { // instead of writing the function to execute the request we use Select2's convenient helper
url: "../clients/listaclients/",
dataType: 'json',
data: function (term) {
return {
term: term, // search term
};
},
results: function (data) { // parse the results into the format expected by Select2.
// since we are using custom formatting functions we do not need to alter remote JSON data
return {results: data};
}
},
});
发生了什么事?
【问题讨论】:
标签: jquery jquery-plugins jquery-select2