表格行数不确定,如何为表格最后一行指定样式?
如题
------解决方案--------------------Easy
L@_@K
<body>
<table id= "tabTest ">
<tr>
<td> 1 </td>
<td> 2 </td>
<td> 3 </td>
</tr>
<tr>
<td> 4 </td>
<td> 5 </td>
<td> 6 </td>
</tr>
<tr>
<td> 7 </td>
<td> 8 </td>
<td> 9 </td>
</tr>
</table>
<script type= "text/javascript ">
<!--
var oTest = document.getElementById( "tabTest ");
oTest.rows(oTest.rows.length-1).style.backgroundColor = "blue ";
//-->
</script>
</body>