<HEAD> 〜 </HEAD> | |
<script language="JavaScript">
<!-- 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") document.write("こんな時間にご苦労様です!! "); if( myhour>"23") document.write("こんな時間にご苦労様です!! "); if( myhour<"10" & myhour>"3") document.write("おはようございます!! "); if( myhour<"19" & myhour>"9") document.write("こんにちは!! "); if( myhour<"23" & myhour>"18") document.write("こんばんわ!! "); document.write(" ただいま "+myyear+" 年 "+mymonth+" 月 "+mydate+" 日 ("+myyoubi+")、時間は "+myhour+" 時 "+myminutes+" 分です。"); document.write("\n<BR>"); } //--> </script> |
|
<BODY> 〜 </BODY> | |
<script language="JavaScript">
<!-- printtime(); //--> </script> |