年月日:

var oDate = new Date()
//
oDate.getFullYear();
//月 返回的月份要+1才正常
oDate.getMonth()+1//
oDate.getDate();
//星期 (0~6对应‘日’到‘六’)
oDate.getDay();

时分秒:

var oDate = new Date()
//
oDate.getHours();
//
oDate.getMinutes(); 
//
oDate.getSeconds();

 

相关文章:

  • 2021-09-14
  • 2022-12-23
  • 2022-12-23
  • 2021-08-01
  • 2021-08-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-23
  • 2022-12-23
  • 2021-06-02
相关资源
相似解决方案