get row with className

后端 未结 6 1655
甜味超标
甜味超标 2021-01-27 01:24

How can you get the first row in a table with a specific className?

var rows = $(\'tr\', tbl);
6条回答
  •  北荒
    北荒 (楼主)
    2021-01-27 01:52

    You can use the :first selector along with the class selector,

    Try this:

    var rows = $('tr.someclass:first', tbl);
    

提交回复
热议问题