<style type="text/css">
.blue{
background-color:blue;
color: aliceblue;
}
.red{
background-color:red;
color: white;
}
</style>
<tr class ="blue"
onClick="document.foo.bar.checked = !document.foo.bar.checked; this.className = this.className == 'blue' ? 'red' : 'blue'; ">
<form name="foo">
<td>
<input type="checkbox" name="bar">
Test
</td></form></tr>
</table>
Javascript trick #35325 0 Comments More | Login | Reply /