开发者

move cursor from input box with jquery

开发者 https://www.devze.com 2023-01-07 07:12 出处:网络
I\'m trying to do something but I\'m not sure what it\'s called or what I should be looking for. I want to do it in jquery.

I'm trying to do something but I'm not sure what it's called or what I should be looking for.

I want to do it in jquery.

Basically when you're in an input box, if the user enters a character I want the caret to automatically jump to the next input box. Banks usually have it.

What clas开发者_JAVA百科s does this or what should I be looking for?

Thanks for any help.


Go to next input box after 5th character is entered:

$('#in1').keyup(function() {
    if ($('#in1').val().length > 4) {
        $('#in2').focus();
    }
});
0

精彩评论

暂无评论...
验证码 换一张
取 消