How to get table cell at specified index using jQuery

前端 未结 3 464
半阙折子戏
半阙折子戏 2020-12-14 16:17

I know that I can get first or last table cell (e.g. for last row) using jQuery expression like below:

first cell: $(\'#table tr:last td:first\') or las

3条回答
  •  南笙
    南笙 (楼主)
    2020-12-14 16:27

    Use the nth-child selector.

    For example,

    $('#table tr:last td:nth-child(2)')
    

提交回复
热议问题