zoukankan      html  css  js  c++  java
  • Date 日期

    var time=new Date()
     console.log(time)
     //标准时间


     var day=time.getDate()
     console.log(day)
     //返回某月中的某一天


     var week=time.getDay()
     console.log(week)
     //返回某周中的某一天


     var year=time.getFullYear()
     console.log(year)
     //以4位数字返回年份


     var hours=time.getHours()
     console.log(hours)
     //返回对象中的小时


     var minutes=time.getMinutes()
     console.log(minutes)
     //返回分钟数


     var seconds=time.getSeconds()
     console.log(seconds)
     //返回秒数


     var haomiao=time.getTime()
     console.log(haomiao)
     //获取70年1月日到现在的毫秒数

    案列1:时间

     案列2 :倒计时

  • 相关阅读:
    排序
    最小栈
    移除链表元素
    回文链表
    maven自动建立目录骨架
    maven的结构和构建命令
    递归
    链表的中间结点
    括号匹配
    软件工程个人作业01
  • 原文地址:https://www.cnblogs.com/yang08/p/10112959.html
Copyright © 2011-2022 走看看