0
대부분의 브라우저에서 작동하지만 IE6,7,8에서 작동하는 jQuery 자동 완성이 있습니다 (IE9에서 작동). 첫 번째 값을 선택한 후 jQuery 자동 완성을 사용하면 아래쪽 화살표를 눌러 가능한 값의 목록을 가져옵니다. 정확히 하나의 항목, 즉 이미 선택된 항목의 목록을 얻습니다. 전체 목록을 원합니다.jQuery UI 자동 완성 및 IE6,7,8의 복수 값
function split(term){
return term.split(/,\s*/);
}
control.autocomplete({
minLength: minLength,
source: function (request, response) {
// delegate back to autocomplete, but extract the last term
response($.ui.autocomplete.filter(
values, split(request.term).pop()));
},
select: function (event, ui) {
var terms = split(this.value);
// remove the current input
terms.pop();
// add the selected item
terms.push(ui.item.value);
// add placeholder to get the comma-and-space at the end
terms.push("");
this.value = terms.join(", ");
updateConfiguration();
return false;
}
});