Ver Mensaje Individual
  #3 (permalink)  
Antiguo 04/06/2007, 05:17
Avatar de KarlanKas
KarlanKas
Moderador extraterrestre
 
Fecha de Ingreso: diciembre-2001
Ubicación: Madrid
Mensajes: 6.987
Antigüedad: 23 años, 2 meses
Puntos: 61
Re: Switch en Firefox

También funciona así:
Código PHP:
<html>
<
head>
<
script language="javascript" type="text/javascript">
function 
Cambio (obj) {

    switch (
obj.style.backgroundColor)
    {
        case 
"" :
            
obj.style.background "red";
            break;
        case 
"red" :
            
obj.style.background "yellow";
            break;
        case 
"yellow" :
            
obj.style.background "red";
            break;
    }
}
</script>
</head>
<body>
<table border="1">
<tr>
<td onmouseover="Cambio(this)" onmouseout="Cambio(this)">Texto</td>
</tr>
</table>
</body>
</html> 
Y tal vez sea más sencillo...
__________________
Cómo escribir

No hay pregunta tonta, sino tonto que quiere seguir en la ignorancia.