<script type="text/javascript">
    //得到当前时间yyyy-MM-dd
    var myDate = new Date();
    var nowDateTime = myDate.getFullYear();
    nowDateTime = nowDateTime + ((myDate.getMonth() + 1) < 10 ? "-0" + (myDate.getMonth() + 1) : "-" + (myDate.getMonth() + 1));
    nowDateTime = nowDateTime + (myDate.getDate() < 10 ? "-0" + myDate.getDate() : "-" + myDate.getDate());
    
    alert(nowDateTime);
</script>

  

相关文章:

  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-07-18
  • 2022-12-23
  • 2021-10-13
  • 2021-11-14
  • 2022-12-23
  • 2022-02-10
相关资源
相似解决方案