javascript time

good code I might use it
 
its basic js >_> im just learning it and Im surpissed taylor hasnt posted it
 
Because I did so in php???

And heres a better version.

This will display a message depending what day it is.
CODE

//0=sunday 1=monday 2=tuesday 3- wed. 4= thr 5= fri. 6= sat. Enjoy
var d=new Date();
theDay=d.getDay();
switch (theDay)

{

case 1:
 document.write("Have a very happy Monday!");
 break;

case 2:
 document.write("Have a great Tuesday!");
 break;

case 3:
 document.write("Have a whacky Wednesday");
 break;

case 4:
 document.write("Tomorrow is Friday! ");
 break;

case 5:
 document.write("Today is Friday, last day for school for the week!");
 break;
case 6:
 document.write("Yeah! The weekend, it is Saturday!");
 break;
case 0:
 document.write("stupid Sunday... school's tomorrow..");
 break;
}
 
and taylor its only cool if I have a warn...

... *goes to get image*

*coughthanksruggycough*
the pic is not allowed here
freak.jpg

trashcat.jpg


thats only a couple
 
Back
Top