title: Focus next element if validation function returns true
body: <p>I have multiple inputs which allow a single digit numeric value. The script below confirms the the value is a number. </p>
  
  <p>How can I move focus to the next input when a valid number has been input?</p>
  
  <pre><code>&lt;input type="text" maxlength="1" onkeypress="return isNumber(event)" required&gt;
  </code></pre>
  
  
  
  <pre><code>function isNumber(evt) {
      evt = (evt) ? evt : window.event;
      var charCode = (evt.which) ? evt.which : evt.keyCode;
      if (charCode &gt; 31 &amp;&amp; (charCode &lt; 49 || charCode &gt; 53)) {
          return false;
      }
      return true;
  }
  </code></pre>