Get second child using jQuery

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

returns

test1test2

I want to retrieve the second td<

9条回答
  •  萌比男神i
    2020-12-12 15:58

    I didn't see it mentioned here, but you can also use CSS spec selectors. See the docs

    $('#parentContainer td:nth-child(2)')
    

提交回复
热议问题