new Date().toLocaleString().replace(/[\u4e00-\u9fa5]/g,'').replace(/\//g,'-')

得如如下格式日期

"2021-4-23 1:33:51"

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-19
  • 2021-11-28
  • 2021-11-29
  • 2021-11-29
猜你喜欢
  • 2022-02-06
  • 2021-08-08
  • 2021-11-28
  • 2021-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案