Get second child using jQuery

前端 未结 9 1570
灰色年华
灰色年华 2020-12-12 15:03
$(t).html()

returns

test1test2

I want to retrieve the second td<

9条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-12 15:59

    grab the second child:

    $(t).children().eq(1);
    

    or, grab the second child :

    $(t).children('td').eq(1);
    

提交回复
热议问题