jquery – 在表格中选择行,除了表头行

前端之家收集整理的这篇文章主要介绍了jquery – 在表格中选择行,除了表头行前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
如何在html表中选择行,除了使用 jquery的表头行? @H_404_2@<table id="mytable"> <thead> <tr> <th> Foo </th> <td> Lorem </td> <td> Ipsum </td> </tr> </thead> <tr> <th> Bar </th> <td> Dolor </td> <td> Sit </td> </tr> <tr> <th> Baz </th> <td> Amet </td> <td> Consectetuer </td> </tr> </table>

解决方法

@H_404_2@$('tr').not('thead tr').addClass('selected')
原文链接:https://www.f2er.com/jquery/180135.html

猜你在找的jQuery相关文章