您现在的位置: 设计龙 >> 网页设计 >> javascript >> 正文

年月星期日期js代码

Author:佚名 Link:本站原创 Hits: Update:2008-5-17 17:13:42
天极网摘 ViVi收藏夹 365Key 和讯网摘 POCO网摘
 
 
<SCRIPT language=JavaScript>
<!--
todayDate = new Date();
date = todayDate.getDate();
month= todayDate.getMonth()+1;
year= todayDate.getYear();
document.write("今天是")
document.write(" ")
document.write(year);
document.write("年");
document.write(month);
document.write("月");
document.write(date);
document.write("日");
document.write(" ")
if (todayDate.getDay() == 5) document.write("星期五")
if (todayDate.getDay() == 6) document.write("星期六")
if (todayDate.getDay() == 0) document.write("星期日")
if (todayDate.getDay() == 1) document.write("星期一")
if (todayDate.getDay() == 2) document.write("星期二")
if (todayDate.getDay() == 3) document.write("星期三")
if (todayDate.getDay() == 4) document.write("星期四")
//-->
</SCRIPT>
   
  • 上一篇文章:
  • 下一篇文章:
  • [回到标题] [回到顶部]