date.js
资源名称:TELEPHONE.rar [点击查看]
上传用户:woden7206
上传日期:2015-11-28
资源大小:14486k
文件大小:1k
源码类别:
单片机开发
开发平台:
MultiPlatform
- today=new Date();
- var hours = today.getHours();
- var minutes = today.getMinutes();
- var seconds = today.getSeconds();
- var timeValue = "" + ((hours >12) ? hours -12 :hours); timeValue += ((minutes < 10) ? "<BLINK>:</FONT></BLINK>0" : "<BLINK>:</FONT></BLINK>") + minutes+"</FONT></FONT>";
- timeValue += (hours >= 12) ? " PM" : "AM";
- function initArray(){
- this.length=initArray.arguments.length
- for(var i=0;i<this.length;i++)
- this[i+1]=initArray.arguments[i] }
- var d=new initArray("星期日","星期一","星期二","星期三","星期四","星期五","星期六"); document.write("",today.getYear(),"年","",today.getMonth()+1,"月","",today.getDate(),"日 ",d[today.getDay()+1]," ",timeValue);