TOP /リクエスト | 日付と時間 |
---|
<script language="JavaScript"><!-- backc="blue"; //背景色 fontc="#ffffff"; //文字色 family="Times New Roman"; //フォント //-------------------------------------------- document.write("<form name='form1'>"); document.write("<input type=text name='time'") document.write("style='background-color:"+backc+";color:"+fontc+";font-family:"+family+";width:140;'readonly>"); document.write("</form>") function nowtime(){ now=new Date(); H=(now.getHours()<10)?"0"+now.getHours():now.getHours(); M=(now.getMinutes()<10)?"0"+now.getMinutes():now.getMinutes(); S=(now.getSeconds()<10)?"0"+now.getSeconds():now.getSeconds(); Mon=now.getMonth()+1; Year=now.getYear(); if(Year < 2000)Year+=1900; document.form1.time.value=Year+"年"+Mon+"月"+now.getDate()+"日"+H+":"+M+":"+S; } setInterval("nowtime()",1000);/* himajin.moo.jp */ // --></script>