用子元素过滤 $("#tab tr:nth-child(even)").css("background-color","red"); //偶数行样式 $("#tab tr:nth-child(odd)").css("background-color","red"); //奇数行样式