Во, набыдлокодил:
<form id="brigade" action="/" method="get">
<table id="members">
<tr class="name">
<td>Вася</td>
<td>
<input type="checkbox" name="member" value="vasya">
</td>
</tr>
<tr class="name">
<td>Петя</td>
<td>
<input type="checkbox" name="member" value="petya">
</td>
</tr>
<tr class="name">
<td>Боря</td>
<td>
<input type="checkbox" name="member" value="borya">
</td>
</tr>
<tr class="name">
<td>Равшан</td>
<td>
<input type="checkbox" name="member" value="ravshan">
</td>
</tr>
</table>
<table id="colors">
<tr class="color">
<td>Жёлтый</td>
<td>
<input type="radio" name="color" value="yellow">
</td>
</tr>
<tr class="color">
<td>Синий</td>
<td>
<input type="radio" name="color" value="blue">
</td>
</tr>
<tr class="color">
<td>Зелёный</td>
<td>
<input type="radio" name="color" value="green">
</td>
</tr>
<tr class="color">
<td>Серый</td>
<td>
<input type="radio" name="color" value="gray">
</td>
</tr>
</table>
<input type="text" name="choosencolor" value="">
<input type="submit" value="Выделить" id="submit">
</form>
<script type="text/javascript">
var button = document.getElementById('submit');
var checkboxes = document.getElementsByName('member');
var radios = document.getElementsByName('color');
var choosencolor = document.getElementsByName('choosencolor')[0];
for (var i = 0; i < radios.length; i++) {
radios[i].onchange = function(e){
choosencolor.value = this.value;
}
}
button.onclick = confirm;
function confirm(event){
event.preventDefault();
for (var i = 0; i < checkboxes.length; i++) {
if(checkboxes[i].checked){
checkboxes[i].parentNode.parentNode.setAttribute('style', 'background:'+ choosencolor.value + ';');
}
}
}
</script>