<table id="id1" border="1" style="border-collapse:collapse;">
<tr><th>th<th>th<th>th<th>th</tr>
<tr><th>th<td>td (0 / -9)<td>td (1 / -8)<td>td (2 / -7)</tr>
<tr><th>th<td>td (3 / -6)<td>td (4 / -5)<td>td (5 / -4)</tr>
<tr><th>th<td>td (6 / -3)<td>td (7 / -2)<td>td (8 / -1)</tr>
</table>
<script>
$("#id1 td:eq(4)").css("color", "red");
$("#id1 td:gt(6)").css("background-color", "yellow");
$("#id1 td:lt(2)").css("background-color", "cyan");
</script>
th | th | th | th |
---|
th | td (0 / -9) | td (1 / -8) | td (2 / -7) |
---|
th | td (3 / -6) | td (4 / -5) | td (5 / -4) |
---|
th | td (6 / -3) | td (7 / -2) | td (8 / -1) |
---|
<table id="id2" border="1" style="border-collapse:collapse;">
<tr><th>th<th>th<th>th<th>th</tr>
<tr><th>th<td>td (0 / -9)<td>td (1 / -8)<td>td (2 / -7)</tr>
<tr><th>th<td>td (3 / -6)<td>td (4 / -5)<td>td (5 / -4)</tr>
<tr><th>th<td>td (6 / -3)<td>td (7 / -2)<td>td (8 / -1)</tr>
</table>
<script>
$("#id2 td:eq(-5)").css("color", "red");
$("#id2 td:gt(-3)").css("background-color", "yellow");
$("#id2 td:lt(-7)").css("background-color", "cyan");
</script>
th | th | th | th |
---|
th | td (0 / -9) | td (1 / -8) | td (2 / -7) |
---|
th | td (3 / -6) | td (4 / -5) | td (5 / -4) |
---|
th | td (6 / -3) | td (7 / -2) | td (8 / -1) |
---|
<table id="id3" border="1" style="border-collapse:collapse;">
<tr><th>th<th>th<th>th<th>th</tr>
<tr><th>th<td>td (0 / -9)<td>td (1 / -8)<td>td (2 / -7)</tr>
<tr><th>th<td>td (3 / -6)<td>td (4 / -5)<td>td (5 / -4)</tr>
<tr><th>th<td>td (6 / -3)<td>td (7 / -2)<td>td (8 / -1)</tr>
</table>
<script>
$("#id3 td").eq(4).css("color", "red");
$("#id3 td").slice(6 + 1).css("background-color", "yellow");
$("#id3 td").slice(0, 2).css("background-color", "cyan");
</script>
th | th | th | th |
---|
th | td (0 / -9) | td (1 / -8) | td (2 / -7) |
---|
th | td (3 / -6) | td (4 / -5) | td (5 / -4) |
---|
th | td (6 / -3) | td (7 / -2) | td (8 / -1) |
---|
<table id="id4" border="1" style="border-collapse:collapse;">
<tr><th>th<th>th<th>th<th>th</tr>
<tr><th>th<td>td (0 / -9)<td>td (1 / -8)<td>td (2 / -7)</tr>
<tr><th>th<td>td (3 / -6)<td>td (4 / -5)<td>td (5 / -4)</tr>
<tr><th>th<td>td (6 / -3)<td>td (7 / -2)<td>td (8 / -1)</tr>
</table>
<script>
$("#id4 td").eq(-5).css("color", "red");
$("#id4 td").slice(-3 + 1).css("background-color", "yellow");
$("#id4 td").slice(0, -7).css("background-color", "cyan");
</script>
th | th | th | th |
---|
th | td (0 / -9) | td (1 / -8) | td (2 / -7) |
---|
th | td (3 / -6) | td (4 / -5) | td (5 / -4) |
---|
th | td (6 / -3) | td (7 / -2) | td (8 / -1) |
---|