html怎么实现页面跳转

 2022-08-15    417  

html怎么实现页面跳转


html怎么实现页面跳转

我们在html中可以使用meta标签来实现跳转,通过meta标签我们可以设置跳转时间和页面。可能有很多人不太了解meta标签,下面我们就来简单介绍下meta标签。

<meta> 标签提供了 HTML 文档的元数据。元数据不会显示在客户端,但是会被浏览器解析。

比如下面这几个例子:

定义文档关键词,用于搜索引擎:

<meta name="keywords" content="HTML, CSS, XML, XHTML, JavaScript">

定义web页面描述:

<meta name="description" content="Free Web tutorials on HTML and CSS">

定义页面作者:

<meta name="author" content="Hege Refsnes">

每30秒刷新页面:

<meta http-equiv="refresh" content="30">

那么我们该如何使用meta标签实现页面跳转呢?

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


  •  标签:  
  • html
  •  

原文链接:http://www.77isp.com/post/2643.html

=========================================

http://www.77isp.com/ 为 “云服务器技术网” 唯一官方服务平台,请勿相信其他任何渠道。