![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
05/06/2007, 08:56
|
![Avatar de KarlanKas](http://static.forosdelweb.com/customavatars/avatar11549_2.gif) | 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 El problema está en como llama uno y otro navegador a los colores. Creo que sería mejor usar una segunda variable para hacer que cambie de color: Código PHP: <html>
<head>
<title>Untitled</title>
<script>
function Cambio(obj,obj2) {
switch (obj2)
{
case 1 :
obj.style.backgroundColor = "#ffff00";
break;
case 0 :
obj.style.backgroundColor= "#ff0000";
break;
}
}
</script>
</head>
<body>
<table border="1">
<tr>
<td onmouseover = "Cambio(this,0)" onmouseout = "Cambio(this,1)" > Texto </td>
</tr>
</table>
</body>
</html>
Espero que te sirva!
__________________ Cómo escribir
No hay pregunta tonta, sino tonto que quiere seguir en la ignorancia. |