title: How to get textbox values inside the table
body: <p>I have a table (with two textboxes Item and Count) in my webpage.</p>
  
  <p><img src="https://i.stack.imgur.com/TYa73.png" alt="enter image description here"></p>
  
  <p>I try to access the values of two textboxes in each rows.</p>
  
  <p>Please see my code below</p>
  
  <pre><code> &lt;table id="tbl-contents" class="table"&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Item&lt;/th&gt;
              &lt;th&gt;Count&lt;/th&gt;
              &lt;th&gt;&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr class="clsRow"&gt;
              &lt;td&gt;
                  @*
                  &lt;input type="text" class="form-control" placeholder="Item" data-required="true"&gt;*@
                  &lt;input id="txtItem" class="form-control" placeholder="Item" type="text" value="" tabindex="-1" name="" data-required="true"&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  @*
                  &lt;input type="text" class="form-control" placeholder="Item Count" data-required="true"&gt;*@
                  &lt;input id="txtItemCount" class="form-control" placeholder="Item Count" type="text" value="" tabindex="-1" name="" data-required="true"&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr class="clsRow"&gt;
              &lt;td&gt;
                  &lt;input type="text" class="form-control" placeholder="Item"&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  &lt;input type="text" class="form-control" placeholder="Item Count"&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  &lt;a class="clsDelContent"&gt;&lt;i class="fa fa-minus-square" style="font-size: 22px;"&gt;&lt;/i&gt;&lt;/a&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr class="clsRow"&gt;
              &lt;td&gt;
                  &lt;input type="text" class="form-control" placeholder="Item"&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  &lt;input type="text" class="form-control" placeholder="Item Count"&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  &lt;a class="clsDelContent"&gt;&lt;i class="fa fa-minus-square" style="font-size: 22px;"&gt;&lt;/i&gt;&lt;/a&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
      &lt;tfoot&gt;
          &lt;tr&gt;
              &lt;td colspan="3" style="text-align: right;"&gt;
                  &lt;a class="clsAddContent"&gt;&lt;i class="fa fa-plus-square" style="font-size: 22px;"&gt;&lt;/i&gt;&lt;/a&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tfoot&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>Script</p>
  
  <pre><code>        $('#tbl-contents tbody tr').each(function () {
              var customerId = $(this).find("td").html();
  
  
  
              alert(customerId);
          });
  </code></pre>