<script src="jquery-1.7.min.js"></script>
<script>
$(document).ready(function(){
SetTableRowColor()
})
//用CSS控制奇偶行的颜色
function SetTableRowColor()
{
$("#Table
tr:odd").css("background-color", "#e6e6fa")
$("#Table
tr:even").css("background-color", "#fff0fa")
}
</scirpt>
tr:nth-child(even) {background: #CCC}tr:nth-child(odd) {background: #FFF}
要是兼容的话,可以分别定义偶数行样式和奇数行样式;