1,
var date1 =new Date();
Date.parse(date1)
2,new Date().getTime()
3,new Date()-0
最后重要的提示是:
三种方式获取的都是毫秒的。还需要除以1000,才能得到正确的时间戳
时间戳怎么转为标准时间
我写的另一篇博客里介绍啦http://blog.csdn.net/qq_33769914/article/details/52165091
1,
var date1 =new Date();
Date.parse(date1)
2,new Date().getTime()
3,new Date()-0
最后重要的提示是:
三种方式获取的都是毫秒的。还需要除以1000,才能得到正确的时间戳
时间戳怎么转为标准时间
我写的另一篇博客里介绍啦http://blog.csdn.net/qq_33769914/article/details/52165091