Get second td of tr using jquery

后端 未结 5 2116
攒了一身酷
攒了一身酷 2021-02-12 10:54

I\'m trying to get td values of tr.. but unfortunately it\'s not working.. may be there is something wrong

My html looks like

         


        
5条回答
  •  臣服心动
    2021-02-12 11:10

    Replace n with child no.

    $(".dname td:nth-child(n)").text();
    

    For e.g. for 2nd child

    $(".dname td:nth-child(2)").text();
    

提交回复
热议问题