Hola. este código funciona en IE pero en Firefox no. El problema es que se queda en el primer caso ("") y no pasa al segundo. Estoy seguro que el problema en FF es que no lee bien esta linea: switch (obj.style.background)
Código:
<html>
<head>
<script language="javascript" type="text/javascript">
function Cambio (obj) {
switch (obj.style.background)
{
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>
Gracias