title: how to get value of input type from dynamic table using jquery
body: <p>I am working on ecommerce website.</p>
  
  <p>My table gets value from session.
  It looks like :
  <a href="https://i.stack.imgur.com/C3CtW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/C3CtW.png" alt="enter image description here"></a></p>
  
  <p>On <strong>Checkout</strong> I want to get all the values of table.</p>
  
  <p>I have used <strong>jquery</strong> for this.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>&lt;script&gt;
  $('#chhk').on('click',function(e) {
                      e.preventDefault();
                      alert('click');
                  var table = $("#tbl tbody");
  
                   table.find('tr').each(function (i, el) {
                      var $tds = $(this).find('td'),
                          product = $tds.eq(2).text(),
                          price = $tds.eq(3).text(),
                          quantity = $tds.eq(4).attr('value'),
                          total = $tds.eq(5).text();
  
                       alert('Row ' + (i + 1) + ':\nProduct: ' + product
                            + '\nPrice: ' + price
                             + '\nQuantity: ' + quantity
                            + '\nTotal: ' + total);
                  });
  
              });
  &lt;/script&gt;
  </code></pre>
  
  <p>Here 
  <strong>'#chhk'</strong> is checkout button id </p>
  
  <p><strong>'#tbl'</strong> is my table id</p>
  
  <p>I am getting blank value of <strong>quantity</strong> by this script as it is <strong>input field</strong></p>
  
  <p><a href="https://i.stack.imgur.com/0I8eM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0I8eM.png" alt="enter image description here"></a></p>
  
  <p>Any help would be appreciated..</p>