1.Date.now()
2.Math.round(new Date())
3.Date.parse(‘2018-6-25 17:41:21’)
4.Date.UTC(2018,6,25,17,41,21)
5.(new Date()).valueOf()
6.new Date().getTime()
7.Number(new Date())
8.+new Date()
js 获取时间戳
最新推荐文章于 2024-11-01 10:18:14 发布
1.Date.now()
2.Math.round(new Date())
3.Date.parse(‘2018-6-25 17:41:21’)
4.Date.UTC(2018,6,25,17,41,21)
5.(new Date()).valueOf()
6.new Date().getTime()
7.Number(new Date())
8.+new Date()