[java]代码库
<html>
<head>
<title></title>
<script src="jquery-1.8.3.js" type="text/javascript"></script>
<script>
$(function(){
$("#table1 tr:first").css("fontSize","40");
$("#table1 tr:last").css("color","red");
$("#table1 tr:gt(0):lt(3)").css("fontSize","28");//lt(3)是从gt(0)出的序号,不要写成lt(4)
$("#table1 tr:gt(0):even").css("background","red");//表头不参与“正文表格的颜色”;
$("#table1 tr:gt(0):odd").css("background","yellow");
})
</script>
</head>
<body>
<table id="table1">
<tr><td>姓名</td><td>成绩</td></tr>
<tr><td>tom</td><td>100</td></tr>
<tr><td>jim</td><td>99</td></tr>
<tr><td>john</td><td>95</td></tr>
<tr><td>jason</td><td>94</td></tr>
<tr><td>suln</td><td>93</td></tr>
<tr><td>平均分</td><td>96</td></tr>
</table>
</body>
</html>