jquery隔行换色

两种隔行换色的方法

 

$('table tr:even').css("background","#F00");

$('table tr:nth-child(even)').css('background-color',"red"); nth-child: tr下的子元素

posted on 2013-03-18 21:31  ijoanne  阅读(132)  评论(0)    收藏  举报