<script>
function clock(){
setTimeout("clock()",1000);
datec = new Date();
y = datec.getYear();
M = datec.getMonth()+1;
d = datec.getDate();
h = datec.getHours();
m = datec.getMinutes();
s = datec.getSeconds();
if (h < 10) h = "0" + h;
if (m < 10) m = "0" + m;
if (s < 10) s = "0" + s;
if (y < 2000) y += 1900;
time = y + "年" + M + "月" + d + "日" + h + "時" + m + "分" + s + "秒";
document.timeform.timetext.value = time;
}
if(navigator.appName.charAt(0) == "M")
document.write("<form name='timeform'>現在の日時:<input size='35' name='timetext'></form>");
else
document.write("<form name='timeform'>現在の日時:<input size='28' name='timetext'></form>");
clock();
</script>
|