Ver Mensaje Individual
  #2 (permalink)  
Antiguo 01/12/2005, 08:01
Avatar de Saruman
Saruman
 
Fecha de Ingreso: mayo-2003
Ubicación: Panama city, Panama, Panama
Mensajes: 1.154
Antigüedad: 21 años
Puntos: 5
buenas.
aqui está: espero te sirva

Código PHP:
<script>
function 
CambiarColor() { 
  var 
mytable document.getElementById("mytable"); 
  for (
i=0mytable.rows.lengthi++) {
   
//mytable.rows[i].cells.length  //cantidad de columnas
   
mytable.rows[i].cells[0].bgColor "#FFFFFF";
  }
 }
 
 function 
cambiar(src) {
  
CambiarColor();
  
src.bgColor="#CCFF00";
 }
</script> 

Código HTML:
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="mytable">
  <tr>
    <td onClick="cambiar(this);">&nbsp;</td>
  </tr>
  <tr>
    <td onClick="cambiar(this);">&nbsp;</td>
  </tr>
  <tr>
    <td onClick="cambiar(this);">&nbsp;</td>
  </tr>
  <tr>
    <td onClick="cambiar(this);">&nbsp;</td>
  </tr>
  <tr>
    <td onClick="cambiar(this);">&nbsp;</td>
  </tr>
</table> 
saludos
__________________
Saruman

One Ring to rule them all, One Ring to find them, One Ring to bring them all and in the darkness bind them.