如何<tr>
使用 jquery 更改背景颜色?
那我怎样才能用jquery专注于<tr>
元素呢?
Javascript
$('tr#5').???????? to change background color of <tr#5> to #666666;
$('tr#5').???????? to focus on element "tr#1";
.
.
.
$('tr#5').???????? to change background color of <tr#5> back to #ffffff;
$('tr#10').???????? to change background color of <tr#10> to #666666;
$('tr#10').???????? to focus on element "tr#10";
HTML
<div style="border:solid 1px;height:70px; width:500px; overflow-y:scroll;">
<table height="100" width="400">
<tr id="5">
<td>00:00:05</td>
<td>hello! 5 secs has past</td>
</tr>
<tr id="10">
<td>00:00:10</td>
<td>hello! 10 secs has past</td>
</tr>
<tr id="10">
<td>00:00:10</td>
<td>hello! 10-2 secs has past</td>
</tr>
<tr id="11">
<td>00:00:11</td>
<td>hello! 11 secs has past</td>
</tr>
<tr id="30">
<td>00:00:30</td>
<td>hello! 30 secs has past</td>
</tr>
</table>
</div>