Glenn Slaven Kris/Alex, , ASP.NET TextBox, AutoCompleteExtender. Document.getElementById(focusControlID).focus() javascript, , document.getElementById . focusControlID ClientID TextBox. - document.getElementById .
, jQuery , , , , Enter , .
setFocus :
function setFocus(focusControlID) {
$('#' + focusControlID).blur();
$('#' + focusControlID).focus();
}
javascript, TextBox . , , , , . , , UX.
- 100 300. ...
I agree with everyone that this is a hack. But from the point of view of the end user, they do not see this code. Hacking for them is if they need to manually click inside the control, and not just automatically fit inside the control and enter the first few letters to start the automatic search function. So, the hats of everyone who provided their hacks.
Hope this helps someone else.
source
share