我的table是用服务器端脚本生成的,代码类似这样
1
2'''''读取数据库.....
1<table>
2<tr>
3<td> <input name="checkbox```
4rs(" production_no")="" type="checkbox"/> </td>
5<td> <input ```"="" name="<%rs(" production_name")="" type="text"/> </td>
6.......
7</tr>
8</table>
我想让用户选中了复选框后,它所在那一行的表行的颜色改变,不知道怎么实现?
请高手指点一下
---------------------------------------------------------------
1<table width="100%">
2<tr id="vtb">
3<td><input name="vid" onclick="var e = this.parentElement.parentElement; if (this.checked) e.style.backgroundColor='red';else e.style.backgroundColor='';" type="checkbox"/></td>
4<td>free test</td>
5</tr>
6</table>
---------------------------------------------------------------