×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Javascript
Posted by: Coder Conder
Added: Jan 15, 2017 5:26 AM
Views: 11
  1. //Set focus on the first text field:
  2.  
  3.  $("input:text:visible:first").focus();
  4. //This also does the first text field, but you can change the [0] to another index:
  5.  
  6. $('input[@type="text"]')[0].focus();
  7. Or, you can use the ID:
  8.  
  9. $("#someTextBox").focus();
  10.