资源描述:
《网页显示月份日期星期时间代码》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、.word格式,网页显示月份日期星期时间代码网页显示月份、日期、星期、时间代码一、网页显示月份、日期、星期代码<scriptlanguage=JavaScript>today=newDate();functioninitArray(){this.length=initArray.arguments.lengthfor(vari=0;i<this.length;i++)this[i+1]=initArray.arguments[i]}vard=newinitArray("星期日","星期一","
2、星期二","星期三","星期四","星期五","星期六");document.write("<fontcolor=##000000style='font-size:9pt;font-family:宋体'>",,专业.专注..word格式,today.getYear(),"年",today.getMonth()+1,"月",today.getDate(),"日",d[today.getDay()+1],"</font>");</script>二、六种风格时间显示,一定有你喜欢的
3、!<SCRIPTlanguage="javascript"><!--functioninitArray(){for(i=0;i<initArray.arguments.length;i++)this[i]=initArray.arguments[i];}varisnMonths=newinitArray("1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月");varisnDays=newinitArray("星期日"
4、,"星期一","星期二","星期三","星期四","星期五","星期六","星期日");today=newDate();hrs=today.getHours();min=today.getMinutes();,专业.专注..word格式,sec=today.getSeconds();clckh=""+((hrs>12)?hrs-12:hrs);clckm=((min<10)?"0":"")+min;clcks=((sec<10)?"0":"")+sec;clck=(hrs>=12)?"下
5、午":"上午";varstnr="";varns="0123456789";vara="";functiongetFullYear(d){yr=d.getYear();if(yr<1000)yr+=1900;returnyr;}document.write("<table>");//下面各行分别是一种风格,把不需要的删掉即可document.write("<TR><TD>风格一:</TD><TD>"+isnDays[today.getDay()]
6、+","+isnMonths[today.getMonth()]+""+today.getDate()+"日,"+getFullYear(today)+"年");document.write("<TR><TD>风格二:</TD><TD>"+clckh+":"+clckm+":"+clcks+""+clck+"</TD></TR>");documen,专业.专注..word格式,t.write("<TR><TD>风格三
7、:</TD><TD>"+isnDays[today.getDay()]+","+isnMonths[today.getMonth()]+""+today.getDate()+"日,"+getFullYear(today)+"年"+clckh+":"+clckm+":"+clcks+""+clck+"</TD></TR>");document.write("<TR><TD>风格四:</TD><TD>"+(today.g
8、etMonth()+1)+"/"+today.getDate()+"/"+(getFullYear(today)+"").substring(2,4)+"</TD></TR>");document.write("<TR><TD>风格五:</TD><TD>"+hrs+":"+clckm+":"+clcks+"<