Ver Mensaje Individual
  #2 (permalink)  
Antiguo 12/11/2003, 13:34
Avatar de JavierB
JavierB
Colaborador
 
Fecha de Ingreso: febrero-2002
Ubicación: Madrid
Mensajes: 25.052
Antigüedad: 22 años, 3 meses
Puntos: 772
Hola, bhonox.

Veamos si es esto a lo que te refieres:
Código PHP:
<html>
<
head>
<
script>
function 
cambiar(valor){
    
obj=document.getElementById('fila');
    if (
valor==1)
        
obj.style.backgroundColor='green';
    else
        
obj.style.backgroundColor='red';
    }
</script>
</head>

<body>

<table border="1" width="100%">
    <tr id="fila" style="background-color:red">
        <td>&nbsp;</td>
        <td><input type="radio" name="rad" value="1" onclick="cambiar(this.value)"></td>
        <td><input type="radio" name="rad" value="2" onclick="cambiar(this.value)"></td>
    </tr>
</table>

</body>
</html> 
Saludos,

P.D. Si no pones caracteres de subrayado _ dentro del código, será más facil hacer un copy&paste.