开发者

move cursor from input box with 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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜