js 获取时间戳问题?-灵析社区

云卿山手

let now = new Date(); // 把时、分、秒和毫秒都设置成 0 now.setHours(0, 0, 0, 0); // 获取时间戳 let timestamp = now.getTime(); console.log(timestamp);

阅读量:1

点赞量:0

问AI