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

Prueba con esto:
Código PHP:
<html>
<
head>
<
script language="javascript" type="text/javascript">
function 
Cambio (obj) { 
    switch (
obj.style.background.split(" ")[0])
    {
        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> 
Un saludo!
__________________
Cómo escribir

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