设为首页
加为收藏
联系我们
  • 电子商务
  • 软件网络
  • 看天下
  • 营销财经
  • 关闭导航
  • 网络编程
  • 数据库类
  • 关闭导航
  • 网络编程
  • 社交礼仪
  • 数据库类
  • 人文地理
  • 关闭导航
  • 编程工具
  • 电子书籍
  • 关闭导航
  • 生活休闲
  • 演讲讲座
  • 视频教程
  • 经典影视
  • 关闭导航
  • 您的位置: 首页 > 入门教程 > 网络编程 > PHP

    页面跳转代码 攻略

    时间: 2008-09-10  信息来源: 梧桐树下  作者: 编辑整理  点击数:

    内容提示:页面跳转功能在很多场合有着广泛的运用,在SEO应用潮流的时代,一些对搜索引擎不友好的页面跳转功能,往往不得于网站的发展.本文将以最详细而全面的篇幅介绍页面跳转功能的实现方案.

    Meta标签实现页面跳转

     <meta http-equiv="refresh" content="秒; url=下一个页面">


    JavaScript脚本实现页面跳转

     <script language="JavaScript">
           <!--
              var userAgent = navigator.userAgent;
              var MSIEIndex = userAgent.indexOf("MSIE");
              if (userAgent.indexOf("Win") != -1 && 
              userAgent.indexOf("MSIE") != -1 &&
              userAgent.substring((MSIEIndex + 5),(MSIEIndex + 8)) >= 5.5)
              window.location.replace("http://www.shuigong.com"); 
           //-->
    </script>


    根目录跳转至子页面指定页面

    有时候想访问主页时,能直接跳转至某个子目录中的文件,如 cgi-bin/leoboard.cgi 这时,你只要写一个默认的首页文件如index.htm,内容如下,就可以实现你的要求.

    方法一

     <html>
    <head>
    <title>网页跳转</title>
    <meta http-equiv="refresh" content="0;url=cgi-bin/leoboard.cgi">
    </head>
    <body>
    </body>
    </html>


    方法二

    <html>
    <head>
    <title>正在进入>>> Loading>>> </title>
    </head>
    <body bgcolor="#FFFFFF" text="#000000">
    <p> </p><tr> <td width=724>
    <p align=center><font color="red" size="2">正在进入,请等待,谢谢......</font></p></td></tr><tr>
    <td width="724">
    <p align=center>
    <form name=loading>
    <div align=center>
    <p>
    <input type=text name=chart size=46 style="font-family:Arial; font-weight:bolder; color:rgb(124,119,119); background-color:white; padding:0px; border-style:none;">
    <br><input type=text name=percent size=46 style="color:rgb(138,134,134); text-align:center; border-width:medium; border-style:none;"><script>var bar = 0
    var line = "||"
    var amount ="||"
    count()
    function count(){
    bar= bar+2
    amount =amount + line
    document.loading.chart.value=amount
    document.loading.percent.value=bar+"%"
    if (bar<99)
    { setTimeout("count()",10); }
    else
    { window.location = "http://www.wwwfox.net/cgi-bin/leoboard.cgi"; }
    }
    </script>
    </body>
    </html>


    SEO页面跳转代码

    方法一

     <script language="javascript">
         location.replace("http://www.***.com")
    </script>
     
     1 2 3  下一页
    Tags: 页面跳转 责任编辑:aboutstudy
     
      关于我们 友情链接 网站地图 广告服务 联系我们 管理登陆  
      鄂ICP备07014143号  
      Powered by EmpireCMS 5.0  
      Template designed by 直来直往.
      联系信息: QQ 365931563 Email:jiangtian001@sina.com  
      ©CopyRight 2007-2008, SKDE.CN, Inc. All Rights Reserved