GZGame 发表于 2009-10-12 12:33:16

[转帖]页面跳转代码大全

1 &lt;meta http-equiv="refresh" c&gt; <br/><br/>2 <br/><br/>&lt;script language="JavaScript"&gt; <br/>&lt;!-- <br/>var userAgent = navigator.userAgent; <br/>var MSIEIndex = userAgent.indexOf("MSIE"); <br/>if (userAgent.indexOf("Win") != -1 &amp;&amp; <br/>userAgent.indexOf("MSIE") != -1 &amp;&amp; <br/>userAgent.substring((MSIEIndex + 5),(MSIEIndex + 8)) &gt;= 5.5) <br/>window.location.replace("http://www.php100.com"); <br/>//--&gt; <br/>&lt;/script&gt; <br/><br/>没时间转移 <br/><br/>3 <br/><br/>有些人想访问网站时,直接进入某个子目录中的文件,如cgi-bin/leoboard.cgi,这时,你只要写一个默认的首页文件如index.htm,内容如下,就可以实现你的要求. <br/>方法一: <br/><br/>&lt;html&gt; <br/>&lt;head&gt; <br/>&lt;title&gt;网页跳转&lt;/title&gt; <br/>&lt;meta http-equiv="refresh" c&gt; <br/>&lt;/head&gt; <br/>&lt;body&gt; <br/>&lt;/body&gt; <br/>&lt;/html&gt; <br/><br/><br/><br/>方法二 <br/>&lt;html&gt; <br/>&lt;head&gt; <br/>&lt;title&gt;正在进入&gt;&gt;&gt; Loading&gt;&gt;&gt; &lt;/title&gt; <br/>&lt;/head&gt; <br/>&lt;body bgcolor="#FFFFFF" text="#000000"&gt; <br/>&lt;p&gt; &lt;/p&gt;&lt;tr&gt; &lt;td width=724&gt; <br/>&lt;p align=center&gt;&lt;font color="red" size="2"&gt;正在进入,请等待,谢谢......&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; <br/>&lt;td width="724"&gt; <br/>&lt;p align=center&gt; <br/>&lt;form name=loading&gt; <br/>&lt;div align=center&gt; <br/>&lt;p&gt; <br/>&lt;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;"&gt; <br/>&lt;br&gt;&lt;input type=text name=percent size=46 style="color:rgb(138,134,134); text-align:center; border-width:medium; border-style:none;"&gt;&lt;script&gt;var bar = 0 <br/>var line = "||" <br/>var amount ="||" <br/>count() <br/>function count(){ <br/>bar= bar+2 <br/>amount =amount + line <br/>document.loading.chart.value=amount <br/>document.loading.percent.value=bar+"%" <br/>if (bar&lt;99) <br/>{ setTimeout("count()",10); } <br/>else <br/>{ window.location = "http://www.www.php100.com?/cgi-bin/leoboard.cgi"; } <br/>}&lt;/script&gt; <br/><br/>&lt;/body&gt; <br/>&lt;/html&gt; <br/>字体:大 中 小 <br/><br/><br/>Posted by xxhai | 评论(1) | 引用(0) | 阅读59次 <br/>xxhai在 2005年9月21日02:50星期三 评论: <br/>跳转代码- - <br/><br/>Google排名常见问题:关于页面跳转 <br/><br/><br/><br/><br/>SEO跳转代码 <br/>1: <br/>&lt;script language="j avascript"&gt; <br/>location.replace("http://www.***.com") <br/>&lt;/script&gt; <br/><br/><br/>2: <br/>&lt;script language="j avascript"&gt;setTimeout(window.location="http://www.php100.com",0) <br/>&lt;/script&gt; <br/><br/>3: <br/>&lt;script language="JavaScript" &gt; <br/>bName = navigator.appName; <br/>if ((bName == "Netscape") || <br/>(bName == "Microsoft Internet Explorer")) window.location=http://www.php100.com; <br/>&lt;/script&gt; <br/><br/>&lt;FRAMESET rows='*'&gt; <br/>&lt;FRAMESET cols='*'&gt; <br/>&lt;FRAME SRC='http://www.php100.com'&gt; <br/>&lt;noframes&gt; <br/><br/><br/>JS实现跳转代码_多域名指向同一空间 <br/><br/>&lt;script&gt;try { if( self.location == "http://玉米一/" ) { <br/>top.location.href = "http://玉米一/目录"; <br/>} <br/>else if( self.location == "http://玉米二/" ) { <br/>top.location.href = "http://玉米二/目录"; <br/>} <br/>else if( self.location == "http://玉米三/" ) { <br/>top.location.href = "http://玉米三/目录"; <br/>} <br/>else if( self.location == "http://玉米四/" ) { <br/>top.location.href = "http://玉米四/目录"; <br/>} <br/>else { document.write ("错误的访问地址") } } catch(e) { }&lt;/script&gt;
页: [1]
查看完整版本: [转帖]页面跳转代码大全