【发布时间】:2012-01-08 05:52:56
【问题描述】:
我使用的是 jQuery 1.6.2
我正在尝试将表格的第一个和最后一个单元格变为黄色。
基本上,我使用两行代码来完成此操作。
$("tr:first").children("td:first").css("background", "yellow");
$("tr:first").children("td:last").css("background", "yellow");
如何将两个过滤器组合在一起以获得连续的第一个和最后一个 td?
【问题讨论】:
-
我认为您正在寻找
or selector。 stackoverflow.com/questions/2263975/jquery-or-selector
标签: jquery