最新文章:

首页 实用教程

两种网页自动跳转的方法

发布时间:2024年04月02日 评论数:抢沙发 阅读数:222

    一、html的实现
    <head>
    <!-- 以下方式只是刷新不跳转到其他页面 -->
    <meta http-equiv="refresh" content="10">
    <!-- 以下方式定时转到其他页面 -->
    <meta http-equiv="refresh" content="5;url=https://www.wuxiaolei.com">
    </head>
    以上表示5秒后跳转到https://www.wuxiaolei.com



    二、javascript的实现
    <script language="javascript" type="text/javascript">
    // 以下方式直接跳转
    window.location.href='hello.html';
    // 以下方式定时跳转
    setTimeout("javascript:location.href='hello.html'", 5000);
    </script>
本文作者:伤痕磊磊 文章标题: 两种网页自动跳转的方法
本文地址:https://leilei.me/36.html
版权声明:內容出自于原创和网络, 版权归原作者所有。



验 证 码: