资讯中心
News
最全的网页自动跳转代码方法
发布时间:2019-01-22 13:16   您所在的位置: 网站首页 > 新闻资讯 > 建站知识

      网页自动跳转代码方法很多,在这里厦门网站建设小编-云端网络专门为大家收集整理了最全的网页自动跳转代码方法,希望可以帮助大家实现网页自动跳转。

  1、html网页跳转代码

  在网页头部<1head>…</head>之间插入以下代码

  <meta http-equiv="refresh" content="0.1;url=http://www.web1992.com">,其中:content="0.1 为打开该页面后多久时间开始跳转,url=后面跟上你要跳转的网址或者网页地址

  2、js跳转代码

  在网页<body>…</body>之间插入以下代码

  <script language='javascript'>document.location = 'http://www.web1992.com'</script>

  3、asp网页跳转代码

  <%

  Response.Redirect("http://www.web1992.com")

  Response.End

  %>

  4、php网页跳转代码

  <?php

  header("location: http://www.web1992.com");

  ?>

本文章由新概念互动原创,如没特殊注明,转载请注明来自:http://www.jianzhan0.com/zhishi/49353.html