For Developers

set focus on textbox value at the end

Set focus on textbox Value at the End using javascript:

1.Search is a variable that can be given in id for the TextField.
2.setFocus() Method can be call in onload.
3.The Cursor will point at the End of the Value
(if any value Present it will point at the end of the value)


function setFocus()
{
var field = document.form.Search;
field.focus();
field.value = field.value;
field.focus();
}


Demo Link

0 comments:

Post a Comment