码迷,mamicode.com
首页 > Web开发 > 详细

js获取时间戳

时间:2018-10-30 18:42:42      阅读:258      评论:0      收藏:0      [点我收藏+]

标签:view   获取   scale   text   OLE   back   console   lan   color   

<!DOCTYPE html>
<html lang="zh">

    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <meta http-equiv="X-UA-Compatible" content="ie=edge" />
        <title>tips-js获取时间戳</title>
    </head>

    <body>

        <script type="text/javascript">
            let d = new Date(2018, 10, 30, 18, 00, 30)
            //方法一
            console.log(+d)
            //方法二
            console.log(d.getTime())
        </script>
    </body>

</html>

 

js获取时间戳

标签:view   获取   scale   text   OLE   back   console   lan   color   

原文地址:https://www.cnblogs.com/mengfangui/p/9878506.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!