Hola
Sería algo como esto
Código Javascript
:
Ver original<html>
<head>
<script type="text/javascript">
window.onload = function() {
cant_tr = document.body.getElementsByTagName('tr');
cant_inpt = document.body.getElementsByTagName('input');
for (i=0; i < cant_tr.length; i++) {
for (j=2; j < cant_inpt.length; j+=3) {
cant_inpt[j].onclick = function() {
document.getElementById('td_'+this.id).style.backgroundColor = 'red';
}
}
}
}
</script>
</head>
<body>
<table border="1">
<tr id="td_1">
<td><input type="text" value="" /></td><td><input type="text" value="" /></td><td> <input type="checkbox" id="1" /></td>
</tr>
<tr id="td_2">
<td><input type="text" value="" /></td><td><input type="text" value="" /></td><td> <input type="checkbox" id="2" /></td>
</tr>
<tr id="td_3">
<td><input type="text" value="" /></td><td><input type="text" value="" /></td><td> <input type="checkbox" id="3" /></td>
</tr>
</table>
</body>
</html>
Suerte