jQuery第n个孩子
答
可以使用:odd
选择器选择奇数表行,像这样:
$("tr:odd").css("background-color", "#DDD");
答
$("tr:nth-child(odd)").addClass("odd_row");