destoon显示当前月日星期代码


来源: https://destoon.cc/ 时间: 2019-03-01 22:18:33 人气: 1031 评论: 0

 <script language="javascript">
d=new Date(); date=d.getDate(); month=d.getMonth()+1; year=d.getYear(); document.write(date); </script> / <script language="javascript"> d=new Date(); date=d.getDate(); month=d.getMonth()+1; year=d.getYear(); document.write(month); </script>

上面是20/1  样式   
下面是星期几
<script language="javascript"> d=new Date(); date=d.getDate(); month=d.getMonth()+1; year=d.getYear(); if(d.getDay()==5) document.write("周五") if(d.getDay()==6) document.write("周六") if(d.getDay()==0) document.write("周天") if(d.getDay()==1) document.write("周一") if(d.getDay()==2) document.write("周二") if(d.getDay()==3) document.write("周三") if(d.getDay()==4) document.write("周四") </script>

destoon显示当 二开教程

评论
346655709