js获取当前时间的时间戳

var time = Math.round(new Date() / 1000)

console.log("时间戳位:", time);

一定要有/1000;


发布了123 篇原创文章 · 获赞 4 · 访问量 5667

猜你喜欢

转载自blog.csdn.net/tian_jiangnan/article/details/105594506