您的位置:首页 > 其它

几秒钟后页面自动跳转到指定页

2016-06-19 18:24 288 查看
当页面出现错误时,有必要跳转到指定页面。对于seo优化和用户体验是不可缺少的。下面我指出两种跳转到指定页面的方法:

1.在head头部里写meta标签

<head>

        <meta http-equiv="refresh" content="0;URL=http://xxx.xxx.xxx/">

    </head>

content=0 ;   <!--设置本页面停留时间,单位为秒-->

url=http://www.baidu.com/    <!--将要跳转的页面路径-->

   2.用javascript实现

  <html>

      <script language=javascript>

          setTimeout('window.location="http://panliu888.myetang.com"',5000)

      </script>

  </html>

  location为指定跳转页面的路径,5000为时间,单位毫秒!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: