var mydate = new Date();//通过new方法创建对象
    //alert(Date()); // 返回一个完整的日期时间
    // alert(mydate.getDay());//返回当前是周几
    // alert(mydate.getMonth()+1);//返回当前月份
    //alert(mydate.getFullYear());//返回当前年份
    //alert(mydate.getHours());//返回当前小时
    //alert(mydate.getMinutes());//返回当前分钟
    //alert(mydate.getSeconds());//返回当前秒数

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-24
  • 2022-03-03
  • 2021-11-06
  • 2021-09-20
  • 2021-12-01
  • 2022-12-23
相关资源
相似解决方案