JSFiddle - React, Tailwind, and code Playground

HTML

a: <input id="a" type="text" maxlength="5" />
b: <input id="b" type="text" maxlength="5" />
c: <input id="c" type="text" maxlength="5" />

JavaScript

var a = document.getElementById("a"),
    b = document.getElementById("b"),
    c = document.getElementById("c");

a.onkeyup = function() {
    if (this.value.length === parseInt(this.attributes["maxlength"].value)) {
        b.focus();
    }
}

b.onkeyup = function() {
    if (this.value.length === parseInt(this.attributes["maxlength"].value)) {
        c.focus();
    }
}