Ver Mensaje Individual
  #3 (permalink)  
Antiguo 01/05/2005, 06:00
Avatar de JavierB
JavierB
Colaborador
 
Fecha de Ingreso: febrero-2002
Ubicación: Madrid
Mensajes: 25.052
Antigüedad: 24 años, 8 meses
Puntos: 772
Hola davizco

Prueba este código a ver si es lo que buscas. Me ha funcionado en IE y Firefox:
Código PHP:
<html>
<
head>
<
script>
function 
ini() {
  
fec=new Date();
  
h = fec.getHours();
  
foto = (h>8 && h<20) ? 'dia.jpg' : 'noche.jpg';
  
document.getElementById('imagen').src = foto;
}
</script>
</head>
<body onload="ini()">
<img id="imagen" />
</body>
</html> 
Saludos,