How to iterate through a table rows and get the cell values using jQuery

前端 未结 5 1425
天涯浪人
天涯浪人 2020-12-30 04:16

I am creating the below table dynamically using jQuery... After executing my code I get the table as below:

5条回答
  •  渐次进展
    2020-12-30 04:52

    $(this) instead of $this

    $("tr.item").each(function() {
            var quantity1 = $(this).find("input.name").val(),
                quantity2 = $(this).find("input.id").val();
    });
    

    Proof_1:

    proof_2:

提交回复
热议问题