Ver Mensaje Individual
  #6 (permalink)  
Antiguo 23/03/2007, 10:40
Vane_
 
Fecha de Ingreso: febrero-2007
Mensajes: 244
Antigüedad: 18 años
Puntos: 0
Re: cambio de color

Ok, pero mira, si yo pongo este código:

Código PHP:
<html>
<
head>
<
script type="text/javascript">
function 
marcar() {
  for (
i=0celda arguments[i]; i++)
    
document.getElementById(celda).style.background '#F0F';
}
</script>
</head>
<body>
<input type="text" onfocus = "marcar('algo1')" />
<table>
<tr>
<td id="algo1">Celda 1</td>
<td id="algo1">Celda 1</td>
</tr>
</table>
<table>
<tr>
<td>Celda 2</td>
<td id="algo1">Celda 2</td>
</tr>
</table>
</body>
</html> 
Sólo me cambia el color de la primera celda.....

OK, el onblur lo probaré cuando este funcione...