Move cursor from input window using jquery

I'm trying to do something, but I'm not sure what he called or what I need to look for.

I want to do this in jquery.

Basically, when you are in the input window, if the user enters a character, I want the carriage to automatically move to the next input field. Banks usually have it.

What class is this or what should I look for?

Thanks for any help.

+3
source share
1 answer

Go to the next input field after entering the 5th character:

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

Source: https://habr.com/ru/post/1754598/


All Articles