📜  在一天中的某个时间执行一个函数 js - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:46.657000             🧑  作者: Mango

代码示例3
setInterval(()=>{
let now = new Date();
//86400000 represents 10 hours in milliseconds Change it as you like
if(now.getTime() == 86400000 ){
  //your code
}
}, 1);