<script type="text/javascript">
function showtime() {
var today, hour, second, minute, year, month, date;
var strDate, n_day;
today = new Date();
year = today.getFullYear();
month = today.getMonth() + 1;
date = today.getDate();
hour = today.getHours();
minute = today.getMinutes();
second = today.getSeconds();
n_day = today.getDay();
if (month < 10) month = "0" + month;
if (date < 10) date = "0" + date;
if (hour < 10) hour = "0" + hour;
if (minute < 10) minute = "0" + minute;
if (second < 10) second = "0" + second;
switch (n_day) {
case 0:
strDate = "日曜日";
break;
case 1:
strDate = "月曜日";
break;
case 2:
strDate = "火曜日";
break;
case 3:
strDate = "水曜日";
break;
case 4:
strDate = "木曜日";
break;
case 5:
strDate = "金曜日";
break;
case 6:
strDate = "土曜日";
break;
case 7:
strDate = "星期日";
break;
}
document.getElementById('time').innerHTML = year + "/" + month + "/" + date + " " + strDate + " " + hour + ":" + minute + ":" + second;
setTimeout("showtime();", 1000);
}
</script>
<body>
<div id="time">
<script type="text/javascript">showtime();</script>
</div>
</body>