日期 <script language="JavaScript" > var enabled = 0; today = new Date(); var day; var date; if(today.getDay()==0) day = "星期日" if(today.getDay()==1) day = "星期一" if(today.getDay()==2) day = "星期二" if(today.getDay()==3) day = "星期三" if(today.getDay()==4) day = "星期四" if(today.getDay()==5) day = "星期五" if(today.getDay()==6) day = "星期六" date=(today.getYear())+"年"+(today.getMonth()+1)+"月"+today.getDate()+"日"; document.write("<span >"); document.write(date); document.write(" "); document.write(day); document.write("</span>"); </script> |
以上是内存溢出为你收集整理的JS显示当前日期全部内容,希望文章能够帮你解决JS显示当前日期所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)