Weasel's first javascript! on your website it pops up an alert with a response depending on the time!
put it where you'd put html/javascript!
<html>
<body>
<script type="text/javascript">
//Twango's Differant Time reaction script
var d = new Date();
var time = d.getHours();
if (time >= 1 && time <= 7)
{
alert("Yawn... It's too early...");
}
if (time >= 8 && time <= 10)
{
alert("Breakfast Time!");
}
if (time == 11)
{
alert("Time to walk the dog");
}
if (time >= 12 && time <= 14)
{
alert("Lunch Time!");
}
if (time >= 15 && time <= 16)
{
alert("Time to Watch TV");
}
if (time >= 17 && time <= 18)
{
alert("Dinner Time");
}
if (time >= 19 && time <= 21)
{
alert("Time to get ready for bed");
}
if (time >= 22 && time <= 24)
{
alert("Yawn... It's late");
}
</script>
</body>
</html>
var d = new Date();
var time = d.getHours();
if (time == 11)
alert("Time to walk the dog!");
else if (time >= 22)
alert("Yawn... It's late");
else if (time >= 19)
alert("Time to get ready for bed");
else if (time >= 17)
alert("Dinner Time");
else if (time >= 15)
alert("TV Time!");
else if (time >= 12)
alert("Lunch Time!");
else if (time >= 8)
alert("Breakfast Time!");
else if (time >= 1)
alert("Yawn... It's too early...");
best way I could shorten it =p