Ver Mensaje Individual
  #16 (permalink)  
Antiguo 23/04/2008, 15:06
crujikoki
 
Fecha de Ingreso: diciembre-2007
Ubicación: Barcelona
Mensajes: 289
Antigüedad: 17 años, 2 meses
Puntos: 8
Re: Cambiar el color de la fila al selecionar el radio button

Hola,

Mira a ver si esto te sirve:

Código PHP:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="eng"
<
head
    <
link rel="stylesheet" type="text/css" href="css/estiloQuiniela.css"
    <
script type="text/javascript"
         
    function 
colorear(obj
        {
            
fila obj.parentNode.parentNode;
            if(
obj.checked)
                
fila.style.backgroundColor "yellow";
            else
                
fila.style.backgroundColor "white";
        }      
    
</script> 
</head> 

<body> 
 <table id="tabla" name="tabla" border>
     <tr>
         <td><input type="checkbox" id="check1" name="check1" value="1" onclick="colorear(this)"/></td>
         <td>celda 1</td>
         <td>celda 2</td>
         <td>celda 3</td>                           
     </tr> 
     <tr>
         <td><input type="checkbox" id="check2" name="check2" value="2" onclick="colorear(this)"/></td>
         <td>celda 4</td>
         <td>celda 5</td>
         <td>celda 6</td>                               
     </tr> 
     <tr>
         <td><input type="checkbox" id="check3" name="check3" value="3" onclick="colorear(this)"/></td>
         <td>celda 7</td>
         <td>celda 8</td>
         <td>celda 9</td>                               
     </tr>     
</body> 
</html>