title: Input a value in a text box and increment the value in multiple textboxes generated using jquery in php
body: <p>I have a textbox where I will insert a value , say 100. And when I click on the 'Add' button , list of students appear with a textbox field for each student , which is dynamically fetched from database. </p>
  
  <p>Now in each textboxes appeared, I need to get incremented values based on the number given above,like, 101,102 etc. How it will be possible with jquery. Below is the code I used. Thanks in advance.</p>
  
  <p>//input box for adding the number   </p>
  
  <pre><code>&lt;div class="form-group"&gt;
      &lt;div class="col-lg-2"&gt;&lt;b&gt;Start Number&lt;/b&gt;&lt;/div&gt;
      &lt;div class="col-lg-5"&gt;
          &lt;input type="text" name="start_number" id="start_number"&gt;&amp;nbsp;&amp;nbsp;
          &lt;a href="#" id="add_reg"&gt; Add &lt;/a&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>//jquery code for loading students with input box for each</p>
  
  <pre><code>var trHTML = '';
  var j = 0;
  $('#myTable').html('');
  trHTML += '&lt;tr&gt;&lt;/tr&gt;&lt;td&gt;' + '&lt;b&gt;id&lt;/b&gt;' + '&lt;/td&gt;&lt;td&gt;' + '&lt;b&gt;Name&lt;/b&gt;' + '&lt;/td&gt;&lt;td&gt;' + '&lt;b&gt;Register Number&lt;/b&gt;' + '&lt;/td&gt;&lt;/tr&gt;';
  $.each(result, function (i, item) {
      j = j + 1;
      trHTML += '&lt;tr&gt;&lt;td&gt;' + j + '&lt;/td&gt;&lt;td&gt;' + item.name + '&lt;/td&gt;&lt;td&gt;&lt;input type="text" name="regno" id="regno"&gt;&lt;/td&gt;&lt;/tr&gt;';
  });
  $('#myTable').append(trHTML);
  </code></pre>
  
  <p>//myTable is the id of the table to which the rows are appended.</p>
  
  <p>When I type 100 in input field, I need to get 101,102 etc in the textboxes     appended.</p>