focusing on next input (jquery)

前端 未结 12 2449
慢半拍i
慢半拍i 2020-11-30 05:09

I\'ve got four inputs that each take one number. What I want to do is set the focus automatically to the next input once the number has been set. They all have the class \"i

12条回答
  •  一个人的身影
    2020-11-30 05:42

    This will keep focus on the text box, after using next without naming the class or id.

     $(this).hide();        
     $(this).next().show();
     $('input[type=text]').focus();
    

提交回复
热议问题