How to focus on a particular input box on page load using Jquery?

To focus on first input box

$(function(){
$("input")[0].focus();
});



To focus on second input box

$(function(){
$("input")[3].focus();
});



To focus on a particular id of input box

$(function(){
$("id1")[0].focus();
});



Comments

Post a Comment

Popular posts from this blog

datatable with both top and bottom scroll bar.

Display Loader and disable page while waiting for ajax request

Remove GIT integration from VSCode