zl程序教程

您现在的位置是:首页 >  Java

当前栏目

网页跳转备忘

2023-02-18 16:31:27 时间

警告

本文最后更新于 2013-05-12,文中内容可能已过时。

1、html 的实现:

<head>
    <!-- 以下方式只是刷新不跳转到其他页面 -->
    <meta http-equiv="refresh" content="10">
    <!-- 以下方式定时转到其他页面 -->
    <meta http-equiv="refresh" content="5;url=hello.html"> 
</head>

2、javascript 的实现:

<script language="javascript" type="text/javascript"> 
    // 以下方式直接跳转
    window.location.href='hello.html';
    // 以下方式定时跳转
    setTimeout ("javascript:location.href='hello.html'", 5000); 
</script>