PHP头条
热点:

探讨PHP页面自动跳转的实现方法


PHP页面自动跳转的实现对于PHP新手来说还是比较陌生的,希望通过对本文的理解,能够提高我们的实际编程能力,对PHP页面自动跳转的实现方法有一个深刻的了解。

  • 推荐几款性能强大的PHP类库
  • PHP脚本编写在网站开发中的作用解析
  • PHP分页类的具体使用方法
  • PHP跳转代码的实现方法讲解
  • 使用PHP header进行页面跳转出现的问题解

1.meta 标签实现跳转:

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

2 .JavaScript实现跳转:

3 假如访问网站时,直接进入某个子目录中的文件,如cgi-bin/leoboard.cgi,这时,只要写一个默认的首页文件如index.htm,内容如下,就可以实现你的要求.

PHP页面自动跳转方法一:

  1. < html>
  2. < head>
  3. < title>网页跳转< /title>
  4. < meta http-equiv="refresh" content="0;url=cgi-bin/leoboard.cgi">
  5. < /head>
  6. < body>
  7. < /body>
  8. < /html>

PHP页面自动跳转方法二

  1. <html>
  2. < head>
  3. < title>正在进入>>> Loading>>> < /title>
  4. < /head>
  5. < body bgcolor="#FFFFFF" text="#000000">
  6. < p> < /p>< tr> <td width=724>
  7. < p align=center><font color="red" size="2">
    正在进入,请等待,谢谢......< /font>< /p>< /td>< /tr>< tr>
  8. < td width="724">
  9. < p align=center>
  10. < form name=loading>
  11. < div align=center>
  12. < p>
  13. < input type=text name=chart size=46
    tyle
    ="font-family:Arial; font-weight:
    bolder; color:rgb(124,119,119);
    background-color:white; padding:0px;
    border-style:none;"
    >
  14. < 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
  15. var line = "||"
  16. var amount ="||"
  17. count()
  18. function count(){
  19. barbar= bar+2
  20. amountamount =amount + line
  21. document.loading.chart.value=amount
  22. document.loading.percent.value=bar+"%"
  23. if (bar<99)
  24. { setTimeout("count()",10); }
  25. else
  26. { window.location = "http://www.wwwfox.net/cgi-bin/leoboard.cgi"; }
  27. }< /script>
  28. < / body>
  29. < /html>

实现PHP页面自动跳转的代码

1:

  1. < script language="j avascript">
  2. location.replace
    ("http://www.***.com")
  3. < /script>

2:

  1. < script language="j avascript">
  2. setTimeout(window.location=
    "http://www.dinmo.net",0)
  3. < /script>

3:

  1. < script language="JavaScript" >
  2. bName = navigator.appName;
  3. if ((bName == "Netscape") ||
  4. (bName == "Microsoft Internet Explorer"))
  5. window.location=http://www.dinmo.net;
  6. < /script>
  7. < FRAMESET rows=\'*\'>
  8. < FRAMESET cols=\'*\'>
  9. < FRAME SRC=\'http://www.dinmo.net\'>
  10. < noframes>

JS实现跳转代码_多域名指向同一空间

  1. < script>try { if( self.location == "http://玉米一/" ) {
  2. top.location.href = "http://玉米一/目录";
  3. }
  4. else if( self.location == "http://玉米二/" ) {
  5. top.location.href = "http://玉米二/目录";
  6. }
  7. else if( self.location == "http://玉米三/" ) {
  8. top.location.href = "http://玉米三/目录";
  9. }
  10. else if( self.location == "http://玉米四/" ) {
  11. top.location.href = "http://玉米四/目录";
  12. }
  13. else { document.write ("错误的访问地址") } } catch(e) { }
  14. < /script>

www.phpzy.comtrue/php/13364.htmlTechArticle探讨PHP页面自动跳转的实现方法 PHP页面自动跳转的实现对于PHP新手来说还是比较陌生的,希望通过对本文的理解,能够提高我们的实际编程能力,对PHP页面自动跳转的实现方法有一个深...

相关文章

    暂无相关文章
相关频道:

PHP之友评论

今天推荐