HTML网页自动跳转的两种方式

  • 方式一:meta

会先加载原有页面,加载完成后才跳转到目标页面。

<head> <meta http-equiv="refresh" content="5;url=https://www.cnblogs.com/guojbing"> </head>
  • 方式二:javascript

会直接跳转目标页面

window.location.href='https://www.cnblogs.com/guojbing';

posted @ 2021-04-15 16:03  Virbox  阅读(1617)  评论(0编辑  收藏  举报