2020
10-08
10-08
JavaScript实时更新当前的时间的示例代码
实现的效果如下:时间会实时更新具体的JS代码如下vardateStart;functionstart(){dateStart=newDate();//开始时间startTime();}functionstartTime(){set=window.setTimeout("startTime()",1000);vardt=newDate();varday=dt.getDay();varweeks=newArray("星期日","星期一","星期二","星期三","星期四","星期五","星期六");varweek=weeks[day];varyear=dt.getFullYear();//年varmonth=...
继续阅读 >