title: How to get textbox value from a textbox inside HTML Table cell using javascript
body: <p>I have created a HTML table programmatically using javascript, similar to the code below:</p>
  
  <pre><code>function AddRow() {
     var rowcount  = $('#tabBillDet tr').length + 1;
     $('#tabDet tr:last').after("&lt;tr&gt;&lt;td&gt;&lt;input type='text' id='txtItemCode' style='width:80px' /&gt; &lt;/td&gt;&lt;/tr&gt;");
  </code></pre>
  
  <p>I want to get the values entered in this textboxes.</p>
  
  <p>I tried the following:</p>
  
  <pre><code>var tab = $('#tabDet tr');
  for (var i = 0; i &lt; tab.length; i++) {
      var group = $(tab[i].cells[0].children[0]).val();
      var ItemCode = $(tab[i].cells[1].children[0]).val();
  }
  </code></pre>
  
  <p>I have tried by making the ID unique by giving each textbox a seperate ID depending on the row count.</p>
  
  <p>But this is not working. How can I get those values?</p>