Ver Mensaje Individual
  #2 (permalink)  
Antiguo 28/01/2008, 15:57
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
Re: Colorear una fila al dar click!!!

Hola Carxl

Unas pequeñas modificaciones...

Código PHP:
<html>
<
head>
<
script>
function 
marcar(obj) {
  
obj.style.background = (obj.style.background=='') ? 'red' '';
}
</script>
</head>

<body>
<table>
<tr onclick="marcar(this)">
<td>---</td><td>---</td>
</tr>
<tr onclick="marcar(this)">
<td>---</td><td>---</td>
</tr>
</table>
</body>

</html> 
Saludos,