js页面刷新和跳转

页面刷新

  1. setimeout(()=>{        history.go(0)     })    
  2.  location.reload()
  3. location=location
  4. location.assign(location)
  5. location.replace(location)
  6. location.href=location.href

页面跳转

  1.     setTimeout('window.navigate("top.html");',2000);
  2.     setTimeout('window.document.location.href="top.html";',2000);
  3.     setTimeout('window.document.location="top.html";',2000);
  4.     setTimeout('window.location.href="top.html";',2000);
  5.     setTimeout('window.location="top.html";',2000);
  6.     setTimeout('document.location.href="top.html";',2000);              
  7.     setTimeout('document.location="top.html";',2000);
  8.     setTimeout('location.href="top.html";',2000);
  9.     setTimeout('location.replace("top.html")',2000);

猜你喜欢

转载自blog.csdn.net/zhumizhumi/article/details/80941965
今日推荐