I have two html input[type=number] fields. Each field contain 2 digit numeric velue. After entering 2 digit, I want to move the cursor to the next field automatically. How can I do this with Jquery or javaScript.
Asked
Active
Viewed 296 times
0
-
2Possible duplicate of [focusing on next input (jquery)](https://stackoverflow.com/questions/10539113/focusing-on-next-input-jquery) – snipsnipsnip Jun 15 '18 at 03:55
1 Answers
1
You can check length of input of first textbox inside keyup event, then if length equals 2, focus on second input box as.
document.getElementById("id_of_second_textbox").focus();

Mesar ali
- 1,832
- 2
- 16
- 18