js下的sleep实现时间:2024-06-23 12:33:38 function sleep(d){ for(var t = Date.now();Date.now() - t <= d;); } sleep(5000); //当前方法暂停5秒