Ver Mensaje Individual
  #5 (permalink)  
Antiguo 12/11/2015, 03:27
javimarcal
 
Fecha de Ingreso: mayo-2014
Mensajes: 18
Antigüedad: 10 años
Puntos: 0
Respuesta: Countdown image

Al final he dado con este código pero cómo puedo definir la fecha inicial y/o final como referencia?

A continuación adjunto el código:

<script language=javascript>
dias=new Date();
day=dias.getDay();
var numerosimagenes= 16;
images = new Array(numerosimagenes+1);
images[0] = "<img src='#/foto150.jpg' style='width: 100%; height: auto;'>";
images[1] = "<img src='#/foto149.jpg' style='width: 100%; height: auto;'>";
images[2] = "<img src='#/foto148.jpg' style='width: 100%; height: auto;'>";
images[3] = "<img src='#/foto147.jpg' style='width: 100%; height: auto;'>";
images[4] = "<img src='#/foto146.jpg' style='width: 100%; height: auto;'>";
images[5] = "<img src='#/foto145.jpg' style='width: 100%; height: auto;'>";
images[6] = "<img src='#/foto144.jpg' style='width: 100%; height: auto;'>";
images[7] = "<img src='#/foto143.jpg' style='width: 100%; height: auto;'>";
images[8] = "<img src='#/foto142.jpg' style='width: 100%; height: auto;'>";
images[9] = "<img src='#/foto141.jpg' style='width: 100%; height: auto;'>";
images[10] = "<img src='#/foto140.jpg' style='width: 100%; height: auto;'>";
images[11] = "<img src='#/foto139.jpg' style='width: 100%; height: auto;'>";
images[12] = "<img src='#/foto138.jpg' style='width: 100%; height: auto;'>";
images[13] = "<img src='#/foto137.jpg' style='width: 100%; height: auto;'>";
images[14] = "<img src='#/foto136.jpg' style='width: 100%; height: auto;'>";
images[15] = "<img src='#/foto135.jpg' style='width: 100%; height: auto;'>";
document.write(images[day]);
</script>

Espero vuestra valiosa ayuda. Reciban un cordial saludo.