走动的时间JS代码

走动的时间JS代码

<strong><font color="#000000">
<Script language="JavaScript">
var enabled = 0; today = new Date();
var day; var date;
if(today.getDay()==0) day = "星期日 "
if(today.getDay()==1) day = "星期一 "
if(today.getDay()==2) day = "星期二 "
if(today.getDay()==3) day = "星期三 "
if(today.getDay()==4) day = "星期四 "
if(today.getDay()==5) day = "星期五 "
if(today.getDay()==6) day = "星期六 "
document.fgColor = " FF0072";
date1 =(today.getFullYear()) + "年" + (today.getMonth() + 1 ) + "月" + today.getDate() + "日 " ;
date2 = day ;
document.write(date1+"&nbsp;");
document.write(date2+"&nbsp;");
document.write("<span id='clock'></span>&nbsp;");
var now,hours,minutes,seconds,timeValue;
function showtime(){
now = new Date();
hours = now.getHours();
minutes = now.getMinutes();
seconds = now.getSeconds();
timeValue = (hours >= 12) ? " " : " ";
timeValue += hours+ ":";
timeValue += ((minutes < 10) ? "0" : "") + minutes + ":";
timeValue += ((seconds < 10) ? "0" : "") + seconds + "";
clock.innerHTML = timeValue;
setTimeout("showtime()",100);
}
showtime();
</Script>
</font></strong>

发表评论

电子邮件地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据