<script type="text/javascript">
    var d = parseInt(new Date().valueOf()/1000);
    alert(d);                  //当前时间戳

    var d2 = new Date(d*1000); //根据时间戳生成的时间对象
    alert(d2.toString());      //返回的时间字符串
</script>

 

相关文章:

  • 2021-05-23
  • 2021-10-15
  • 2022-12-23
  • 2022-12-23
  • 2022-01-03
  • 2021-11-28
  • 2021-12-05
猜你喜欢
  • 2022-02-08
  • 2021-11-30
  • 2022-12-23
  • 2022-12-23
  • 2021-12-05
  • 2022-12-23
  • 2021-08-15
相关资源
相似解决方案