<HTML>
<BODY>
<center>
<SCRIPT LANGUAGE="JavaScript">
<!--
var today=new Date();
var this_day=today.getDay();
var this_date=today.getDate();
var this_month=today.getMonth()+1;
var this_year=today.getFullYear();
function Day_Text (day_num) {
var Day=new Array();
Day[0]="日曜";
Day[1]="月曜";
Day[2]="火曜";
Day[3]="水曜";
Day[4]="木曜";
Day[5]="金曜";
Day[6]="土曜";
return Day[day_num];
}
var DayName=Day_Text(this_day);
function Month_Text (month_num) {
var Month=new Array();
Month[1]="1月";
Month[2]="2月";
Month[3]="3月";
Month[4]="4月";
Month[5]="5月";
Month[6]="6月";
Month[7]="7月";
Month[8]="8月";
Month[9]="9月";
Month[10]="10月";
Month[11]="11月";
Month[12]="12月";
return Month[month_num];
}
var MonthName=Month_Text(this_month);
var d = new Date();
var h = d.getHours();
if (DayName == "日曜") DayName = "<font color=red>"+DayName+"</font>";
if (DayName == "土曜") DayName = "<font color=blue>"+DayName+"</font>";
document.write("<TABLE BORDER=3 BGCOLOR=WHITE cellpadding=6 cellspacing=4>");
document.write("<TR><TD align=center nowrap><font size=5>"+MonthName+" "+this_date+"日 "+DayName);
document.write("</TD></TR></TABLE><br>");
if (h < 3) document.write("<b>ただ今、真夜中です。</b>");
else if (h < 5) document.write("<b>夜明け前です。</b>");
else if (h < 10) document.write("<b>オッハ〜〜!!</b>");
else if (h < 18) document.write("<b>こんにちわ!</b>");
else document.write("<b>こんばんわ!</b>");
//-->
</SCRIPT>
</center>
</BODY>
</HTML>
|