Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<p>This script automatically jumps to the next text field when a field's maxlength has been reached:</p>
<form id="myForm">
  <input type="text" size="3" tabindex="1" maxlength="3" onkeyup="myFunction(this,this.value)"> -
  <input type="text" size="2" tabindex="2" maxlength="2" onkeyup="myFunction(this,this.value)"> -
  <input type="text" size="3" tabindex="3" maxlength="3" onkeyup="myFunction(this,this.value)">
</form>
<script>
function myFunction(x, y) {
  if (y.length == x.maxLength) {
    var next = x.tabIndex;
    if (next < document.getElementById("myForm").length) {
      document.getElementById("myForm").elements[next].focus();
    }
  }
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_text_autonext by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 21 Dec 2022 18:16:56 GMT -->
</html>