get row with className

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

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

var rows = $(\'tr\', tbl);
6条回答
  •  猫巷女王i
    2021-01-27 02:16

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

    or

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

    Docs here: http://api.jquery.com/category/selectors/

提交回复
热议问题