new Date().toDateString() //把 Date 对象的日期部分转换为可读字符串:
new Date().toDateString() + ' 9:00' // " 9:00" 为指定获取时间戳的时间字符串,前面必须加一个空格
new Date(new Date().toDateString() + ' 9:00') //获取时间戳
JavaScript 获取当天某个时刻的时间戳
最新推荐文章于 2024-03-08 15:22:58 发布