jQuery 为表格添加斑马线效果

Avatar of Chris Coyier
Chris Coyier 发布
$("tr:odd").addClass("odd");

然后使用一些 CSS

.odd {
   background: #ccc;
}