lgnblog

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

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


分类:

技术点:

相关文章: