效果图
代码
- [/code][code] table tr td {width: 60px;height: 60px;border: 1px solid black}
复制代码- .curday{background-color: blue;}
复制代码- [/code][code]document.write(Date())
复制代码- [/code][code] var t=setTimeout(time,1000);
复制代码- [/code][code] var myDate=new Date();
复制代码- [/code][code] var y=myDate.getFullYear();
复制代码- var f=myDate.getMinutes();
复制代码- var s=myDate.getSeconds();
复制代码- var week=["星期日","星期一","星期二","星期三","星期四","星期五","星期六"];
复制代码- document.querySelector("#currentTime").innerHTML=myDate+""+y+"年"+curM+"月"+d+"日"+h+"时"+f+"分"+s+"秒"+week[w];
复制代码- var curT=curDate.getTime();
复制代码- var firstDateT=curT-(d-1)*24*60*60*1000;
复制代码- var firstDate=new Date(firstDateT);
复制代码 [code][/code][code] for(var i=0;i |
|