Ver Mensaje Individual
  #2 (permalink)  
Antiguo 01/03/2010, 15:23
Avatar de hector2c
hector2c
 
Fecha de Ingreso: noviembre-2007
Ubicación: Perú - Tacna
Mensajes: 979
Antigüedad: 16 años, 5 meses
Puntos: 25
Pregunta Respuesta: Relacionar javascript con css

intenta con:

Código PHP:
<html>
<
head>
<
script>
function 
cargarImagen(){
ahora=new Date();
hora=ahora.getHours();
imagen="img/"+hora+".jpg";
document.images["reloj"].src=imagen;
}
</script>
<title>Carga Imagen Por Hora</title>
<style type="text/css">

body {margin:0; padding:0; width:100%; height:100%; overflow:hidden; }
#background{ height:100%; width:100%; position:absolute;}

</style>
</head>

<body onload="cargarImagen()">
<img src="img/1.jpg" name="reloj" id="background">

</body>
</html> 
__________________
blog: hector2c.wordpress.com
email: [email protected]