다음 코드가 있습니다.JQuery .autocomplete focus doesnt work
function halle(row, settings, row_element) {
$('input', row).autocomplete({
minLength: "0",
source: "../../shared/hallensuche.aspx",
select: function (e, ui) {
$(this).val(ui.item.label);
//update hallennr
var aPos = oTableAnwurfzeiten.fnGetPosition(row_element);
oTableAnwurfzeiten.fnUpdate(ui.item.value, aPos[0], 11);
isHalleChanged = true;
$(this).focus().select();
return false;
},
search: function (e, ui) {
},
focus: function (e, ui) {
$(this).val(ui.item.label);
return false;
}
}).focus(function (e, ui) {
$(this).autocomplete("option", "source", "../../shared/hallensuche.aspx?focus=true");
$(this).trigger('keydown.autocomplete');
$(this).select();
return false;
}).keydown(function (e, ui) {
$(this).autocomplete("option", "source", "../../shared/hallensuche.aspx?focus=false" + $('input', row).val());
});
}
입력 내용에 뭔가를 쓰면 keydown 명령이 실행됩니다. .focus에서는 아무 일도 일어나지 않습니다. 경고()를 시도하면 작동합니다. 자동 완성 기능이 수행되지 않으므로 "포커스 = true"는 전송되지 않습니다. 아무도 내가 뭘 잘못하고 있는지 알아? 내 나쁜 영어 죄송합니다
: D
* "focus = true"가 전송되지 않습니다. * 무엇을 의미합니까? 그런 코드는 어디에도 보이지 않습니다. 왜 초점을 맞추기 위해 두 개의 다른 핸들러가 있습니까? –