zoukankan      html  css  js  c++  java
  • date

     function showweek() //显示中文星期
    {
        now = new Date() //定义新对象,new具有Date的性质
      if (now.getDay() == 0) return ("星期日")
      if (now.getDay() == 1) return ("星期一")
      if (now.getDay() == 2) return ("星期二")
      if (now.getDay() == 3) return ("星期三")
      if (now.getDay() == 4) return ("星期四")
      if (now.getDay() == 5) return ("星期五")
      if (now.getDay() == 6) return ("星期六")
    }

    function showdate() //显示系统日期
    {

      var now=new Date();

      var year = now.getYear();

      var month = now.getMonth()+1;

      var day = now.getDate();

      return year+"年"+month+"月"+day+"日";
    }

  • 相关阅读:
    java学习的第三天
    java学习的第二天
    java学习的第一天
    兼容性测试2
    兼容性测试
    安全性测试
    界面测试
    功能性测试
    简历小技巧
    day13
  • 原文地址:https://www.cnblogs.com/ldms/p/3045377.html
Copyright © 2011-2022 走看看