其他分享
首页 > 其他分享> > js获取当前时间戳以及前一天时间戳

js获取当前时间戳以及前一天时间戳

作者:互联网

 js获取当前时间戳以及前一天时间戳(毫秒)

var timestamp = (new Date()).getTime();
console.log(timestamp);//打印当前时间戳
console.log(timestamp-24*60*60*1000);//当前时间戳(毫秒) - 1天毫秒数 = 前一天时间戳


标签:console,log,timestamp,js,毫秒,时间,前一天
来源: https://www.cnblogs.com/lgnblog/p/11095272.html