We would like to know how to select even numbered table row.
<!--from www . j a va 2 s. c o m-->
<html>
<head>
<script type="text/javascript" src='http://code.jquery.com/jquery-1.5.2.js'></script>
<script type="text/javascript">
$(document).ready(function(){
$("tr:even").css("color", "red");
});
</script>
</head>
<body>
<table border="1">
<tr><td>Row</td></tr>
<tr><td>Row</td></tr>
<tr><td>Row</td></tr>
<tr><td>Row</td></tr>
</table>
</body>
</html>
The code above is rendered as follows: