获得当前毫秒数的方法

  //第一种方法   1498627266000
            var timestamp1 =Date.parse(new Date());
            console.log(timestamp1);
            //第二种方法   1498627266558
            var timestamp2 =(new Date()).valueOf();
            console.log(timestamp2);
            //第三种方法   1498627266558
            var timestamp3 =new Date().getTime();

 

posted @ 2018-05-30 18:59  前端极客  阅读(5643)  评论(0编辑  收藏  举报