日付の表示                      



<HEAD> 〜 </HEAD>
    <script language="JavaScript">
<!--
var doc=" "
i=0;
function printtime()
{
youbi =new Array("日","月","火","水","木","金","土");
mytime =new Date();
mydate =mytime.getDate();
myyoubi =youbi[mytime.getDay()];
myyear =mytime.getFullYear();
mymonth =mytime.getMonth()+1;
myhour=mytime.getHours();
myminutes=mytime.getMinutes();
myseconds=mytime.getSeconds();
if( myhour<"4") doc="こんな時間にご苦労様です!! "
if( myhour>"22") doc="こんな時間にご苦労様です!! "
if( myhour<"10" & myhour>"3") doc="おはようございます!! "
if( myhour<"19" & myhour>"9") doc="こんにちは!! "
if( myhour<"23" & myhour>"18") doc="こんばんわ!! "
doc=doc+" ただいま "+myyear+" 年 "+mymonth+" 月 "+mydate+" 日 ("+myyoubi+")、時間は "+myhour+" 時 "+myminutes+" 分です。"
doc=doc+"......"
if(i<=doc.length)
{document.myform.mydoc.value=doc.substring(0,i); i=i+1; setTimeout("printtime()",100);}
else
{i=0; setTimeout("printtime()",1000);}
}
//-->
</script>
<BODY> 〜 </BODY>
    <BODY background="icon/gray.jpg" onLoad="printtime()">

<form name="myform">
<input name='mydoc' size='110'>
</form>


とりあえず動いているようですが、もし、動きがおかしい場合、下記宛にメールでご指摘頂けるとありがたいです・・・

 mailto:ada@maia.eonet.ne.jp