jquery get td text value code example

Example 1: how to get text which is in input td using jquery

$(function(){
    $("#onpressofabutton").click(function(){
        var data1 = $(this).find("td:eq(0) input[type='text']").val();
        var data2 = $(this).find("td:eq(1) input[type='text']").val();
    });
});

Example 2: jquery get td value

$(".item-model-number .value").each(function() {
  var value = $(this).text();
  console.log(value);
})

/* <table>
    <tr class="item-model-number">
      <td class="label">Item model number</td>
      <td class="value">GL552VW-CN426T</td>
    </tr>
  </table> */