title: How do I move the cursor to next input within the next column of the table?
body: <p>I have my table and I dynamically place an input in the cell as the user clicks on add row, and the input is done dynamically, how do I move to that input right after the user clicks on the add item?</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>&lt;script type="text/javascript"&gt;
  
      function addsLine(myTable) {
          var table = document.getElementById(myTable);
          var numLine = table.rows.length;
          var line = table.insertRow(numLine);
          var cel1 = line.insertCell(0);
          var cel2 = line.insertCell(1);
          var inputDinamic = 'item' + numLine;
          var cel = "&lt;input style='border: 0' name="
          var cel = cel + "'" + inputDinamic + "'";
          var cel = cel + " value='1' type='number' id='" + "'" + inputDinamic + "'&gt;";
          cel1.innerHTML = numLine;
          cel2.innerHTML = cel;
      }
  &lt;/script&gt;</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;table id="myTable"&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;td&gt;Selection&lt;/td&gt;
              &lt;td&gt;Value&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          
      &lt;/tbody&gt;
  &lt;/table&gt;
  &lt;button class="btn btn-success" onclick="addsLine('myTable')"&gt;Add&lt;/button&gt;</code></pre>
  </div>
  </div>
  </p>