Ver Mensaje Individual
  #4 (permalink)  
Antiguo 23/03/2007, 10:32
Avatar de JavierB
JavierB
Colaborador
 
Fecha de Ingreso: febrero-2002
Ubicación: Madrid
Mensajes: 25.052
Antigüedad: 23 años
Puntos: 772
Re: cambio de color

Hola de nuevo.

Un ejemplo más completo:

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','algo2')" />
<table>
<tr>
<td id="algo1">Celda 1</td>
<td id="algo2">Celda 1</td>
</tr>
</table>
</body>
</html> 
Cuando se quita el foco, se produce el evento onblur

Saludos,