OKANOWEB WEB PARTS SAMPLE

時計を表示

    <SCRIPTlanguage=JavaScript>
<!--functionshowclock(){days=newArray("日","月","火","水","木","金","土");d=newDate();year=d.getYear();if(year<1900)year+=1900;month=d.getMonth()+1;if(month<10)month="0"+month;date=d.getDate();if(date<10)date="0"+date;hour=d.getHours();if(hour<10)hour="0"+hour;minute=d.getMinutes();if(minute<10)minute="0"+minute;second=d.getSeconds();if(second<10)second="0"+second;str="<FONTCOLOR='#FF6010'SIZE='7'>
<B>
"+year+"/"+month+"/"+date+"("+days[d.getDay()]+")<BR>
"+hour+":"+minute+":"+second+"</B>
";if(document.all)document.all("clock").innerHTML=str;elseif(document.layers){document.clock.document.open();document.clock.document.write(str);document.clock.document.close();}elseelm=document.getElementById("clock").innerHTML=str;}//-->
</SCRIPT>
<METAcontent="MicrosoftFrontPage6.0"name=GENERATOR>
</HEAD>
<BODYonload="setInterval('showclock()',1000)">
<H1>
TIPS&amp;TRICKSClock</H1>
<Pid=clockstyle="LEFT:200px;FONT-FAMILY:'ComicSansMS';POSITION:absolute;TOP:50px">
</P>