javascript刷新网页

cooolr 于 2021-12-28 发布
function sleep(milliseconds) {
  const date = Date.now();
  let currentDate = null;
  do {
    currentDate = Date.now();
  } while (currentDate - date < milliseconds);
  window.location.reload();
}