Javascript changing images daily

Last updated on May 11th, 2016 at 02:15 pm

Click to rate this tutorial!
[Total: 0 Average: 0]

Javascript changing images daily

A simple script that demonstrate how to display different images day by day on your website from Sunday to Saturday, what you have to do is just copy this script [ Make Sure Of Quotes While Copying As I Always Say] So correct those and paste where you have to display the image on you website, very easy.

<script language=javascript>  
/* Changing image or text each day(sunday to saturday) 

Source: http://mistonline.in/

*/
getday=new Date();

day=getday.getDay();

var imagestotal = 7; 

images = new Array(imagestotal+1); 

images[0] = "<img src='myimage.jpg'>"; 

images[1] = "<img src='myimage02.jpg'>"; 

images[2] = "<img src='myimage03.jpg'>"; 

images[3] = "<img src='myimage04.jpg'>"; 

images[4] = "<img src='myimage05.jpg'>"; 

images[5] = "<img src='myimage06.jpg'>"; 

images[6] = "<img src='myimage07.jpg'>";  

document.write(images[day]);
</script>
Click to rate this tutorial!
[Total: 0 Average: 0]

Leave a Reply

Your email address will not be published.