首页 > 源码技巧 > 页面跳转代码集锦
2010
08-19

页面跳转代码集锦

按钮式:

链接式:
返回上一步
">返回上一步
直接跳转式:

开新窗口:
培训
1
2

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


网页跳转





方法二


正在进入>>> Loading>>>



正在进入,请等待,谢谢......












字体:大 中 小
跳转代码- -
Google排名常见问题:关于页面跳转

SEO跳转代码
1:

2:

3:




</br>JS实现跳转代码_多域名指向同一空间 </br><script>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) { }</script></br></br></br><html xmlns="http://www.w3.org/1999/xhtml"></br><head></br><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /></br><title>Loading</title></br></head></br><body></br><form name="loading"></br><p align="center">正在跳转,请稍后...</p></br><p align="center"></br><input type="text" name="bar" style="border-style:none; background-color:#D3E8D0; font-weight:bold" /></br><input type="text" name="percentage"style="border-style:none; background-color:#FFFFFF; max-width:30px"/></br></p></br><p align="center"></br>如果您的浏览器不支持跳转,请点击<a href="http://www.qdpin.cn/bbs">这里</a>手动跳转</br></p></br><script language="javascript" type="text/javascript">  </br>var percent=0;  //百分比进度,显示在滚动条后面</br>var element="||"; //滚动条单元竖线</br>var elements="||";  //滚动条当前竖线</br>count(); //开始调用循环</br>function count(){  </br> percent=percent+10; //每次百分比加10</br> elements =elements + element; //滚动条当前竖线增加一个滚动条单元竖线</br> document.loading.bar.value=elements;  //设置窗体loading表单中bar元素的当前值</br> document.loading.percentage.value=percent+"%";  //设置窗体loading表单中percentage元素的当前值</br> if (percent<99){ //percent小于99则继续循环</br> setTimeout("count()",500); //每500ms进行一次count()</br> }  </br> else{</br> window.location = "http://www.qdpin.cn/bbs"; //percent达到100时跳转</br> }  </br>}</br></script></br></form></br></body></br></html><div id="xf_zsf"><div class="xf_zsf-main"><span class="likes"><a href="javascript:;" title="文章很赞,我赞,我赞,我赞赞赞..." class="sf-praise-sdk" sfa="click" data-postid="699" data-value="1" data-ok="zan" ><i class="iconfont zanyang">&#xf013c;</i> 赞 <span class="sf-praise-sdk" sfa="num" data-value="1" data-postid="699">0</span> </a></span><span class="da_shang"><a href="#ewm" id="modaltriggers" >赏</a></span><span class="shares"><a href="#bdfx" id="modaltriggerss" title="文章不错,好内容要一起分享."><i class="iconfont fenxiang">&#xf012f;</i> 分享 </a></span><div class="clear"></div></div></div> <div class="loc_link"> <ul> <li>本文固定链接: <a href="https://blog.retao5.com/yuanma/699.html" rel="bookmark" title="页面跳转代码集锦">https://blog.retao5.com/yuanma/699.html</a> </li> <li>转载请注明: <a href="https://blog.retao5.com/author/0.html" title="由访客发布" rel="author">访客</a> <time>2010年08月19日</time>于 <a href="https://blog.retao5.com/" title="热淘博客">热淘博客</a> 发表</li> </ul> </div> <div class="author_info"> <div class="au_top_bar"> <!--<div class="edit_date">最后编辑:<time>2000-1-1</time></div>--> <b>作者:访客</b> </div> <div class="avatar"><img alt='访客' src='https://blog.retao5.com/zb_users/avatar/0.png' srcset='https://blog.retao5.com/zb_users/avatar/0.png' class='avatar avatar-96 photo' height='96' width='96' /></div> <div class="type_out"><span class="ttxx"></span> <div class="au_links"> <a href="https://blog.retao5.com/" class="c1"><i class="icon-home"></i> 热淘博客</a> <a href="" class="c2" target="_blank" rel="external nofollow"><i class="icon-globe"></i> 站点</a> <a href="http://wpa.qq.com/msgrd?v=3&uin=&site=qq&menu=yes" class="c4"><i class="icon-comments-alt"></i> QQ交谈</a> </div> </div> <div class="cls"></div> </div> </article> </div> <!-- #post-## --> <div id="nav-below" class="navigation"> <div class="nav-previous"> <a href="https://blog.retao5.com/yuanma/698.html" rel="next"><span class="meta-nav"><i class="icon-arrow-left"></i></span> ECSHOP标签集合之六脉神剑【持续更新】 </a> </div> <div class="nav-next"> <a href="https://blog.retao5.com/yuanma/700.html" rel="prev">定义超级链接技巧【一】 <i class="icon-arrow-right"></i></a> </div> </div> <!-- #nav-below --> <div class="cls"></div> <!--<div class="ad_2"></div>--> <div class="relatedposts"> <h3 class="widget-title"><i class="icon-warning-sign"></i> 您可能还会对这些文章感兴趣!</h3> <ul> </ul> <div class="cls"></div> </div> <div id="comments"> <h3 id="comments-title">《<em>本文</em>》有 0 条评论</h3> <label id="AjaxCommentBegin"></label> <label id="AjaxCommentEnd"></label> <div id="respond" class="comment-respond"> <h3 id="reply-title" class="comment-reply-title">留下一个回复 <small><a rel="nofollow" id="cancel-reply" href="#comment" style="display:none;">取消回复</a></small></h3> <form action="https://blog.retao5.com/zb_system/cmd.php?act=cmt&amp;postid=699&amp;key=d14d0dba35f5b29d7e096f9499f60122" method="post" id="commentform" class="comment-form"> <input type="hidden" name="inpId" id="inpId" value="699"/> <input type="hidden" name="inpRevID" id="inpRevID" value="0"/> <!-- <p class="comment-notes">你的email不会被公开。</p>--> <p class="comment-form-comment"> <label for="comment">评论</label> <textarea id="txaArticle" name="txaArticle" cols="45" rows="8" maxlength="65525" aria-required="true" required></textarea> </p> <p class="comment-form-author"> <label for="author">姓名 <span class="required">*</span></label> <input name="inpName" id="inpName" type="text" value="" size="30" maxlength="245" aria-required='true' required='required'/> </p> <p class="comment-form-email"> <label for="email">电子邮件 <span class="required">*</span></label> <input name="inpEmail" id="inpEmail" type="text" value="" size="30" maxlength="100" aria-describedby="email-notes" aria-required='true'/> </p> <p class="comment-form-url"> <label for="url">站点</label> <input name="inpHomePage" id="inpHomePage" type="text" value="" size="30" maxlength="200"/> </p> <p class="comment-form-inpverify"> <label for="inpverify">验证码</label> <input name="inpVerify" id="inpVerify" type="text" value="" size="30" maxlength="200"/> <img src="https://blog.retao5.com/zb_system/script/c_validcode.php?id=cmt" class="verifyimg" onclick="javascript:this.src='https://blog.retao5.com/zb_system/script/c_validcode.php?id=cmt&amp;tm='+Math.random();"/> </p> <p class="form-submit"> <input name="sumbit" type="submit" id="submit" class="submit" onclick="return zbp.comment.post()" value="发表评论"/> </p> </form> </div> <!-- #respond --> </div> </div> <!-- #content --> </div> <!-- #container --> <aside id="primary" class="side" role="complementary"> <ul class="xoxo"> <li class="widget-container"> <!--<h3 class="page-title">热门文章</h3>--> <h3 class="widget-title">热门文章</h3> <ul> <li><a href="https://blog.retao5.com/diannao/1098.html">魅蓝3 root教程_魅蓝3删除系统软件教程</a></li> <li><a href="https://blog.retao5.com/diannao/220.html">Intel Pro/1000网卡高级设置中英文对照及最优化设置</a></li> <li><a href="https://blog.retao5.com/diannao/141.html">Microsoft .NET Framework 2.0 不能安装-q312/5/00.asp</a></li> <li><a href="https://blog.retao5.com/diannao/198.html">远程桌面登陆后黑屏或无法进行操作的解决办法</a></li> <li><a href="https://blog.retao5.com/diannao/257.html">开机时显示"系统无法让您登陆.请确定您的用户名及...</a></li> <li><a href="https://blog.retao5.com/jianzhan/302.html">LNMP一键安装包的Nginx 502 Bad Gateway错误可能原因及解决方法</a></li> <li><a href="https://blog.retao5.com/djyx/299.html">魔兽争霸秘籍大全,单机模式下有效</a></li> <li><a href="https://blog.retao5.com/jianzhan/5.html">飞飞cms2.8自定义采集详细教程</a></li> <li><a href="https://blog.retao5.com/jianzhan/6.html">国内十大广告联盟排名</a></li> <li><a href="https://blog.retao5.com/jianzhan/107.html">优化wp_head()精简WordPress头部-全注释版</a></li> </ul> </li> <li class="widget-container widget_divPrevious"> <h3 class="widget-title">最近发表</h3> <ul><li><a href="https://blog.retao5.com/jjsy/1416.html">迅雷批量下载,单个下载简单实例2020</a></li> <li><a href="https://blog.retao5.com/yuanma/1415.html">php后端简单判断是邮箱登陆还是手机号登陆</a></li> <li><a href="https://blog.retao5.com/jianzhan/1414.html">漂亮的网站监控面板更新了!又有新功能了!</a></li> <li><a href="https://blog.retao5.com/jianzhan/1413.html">uptimerobot 免费的服务监控平台</a></li> <li><a href="https://blog.retao5.com/jjsy/1412.html">过滤不安全的html标签,输出安全的html简单方法</a></li> <li><a href="https://blog.retao5.com/jianzhan/1411.html">ThinkPhp5 实现token登陆</a></li> <li><a href="https://blog.retao5.com/jianzhan/1410.html">Github+jsDelivr+PicGo 打造稳定快速、高效免费图床</a></li> <li><a href="https://blog.retao5.com/yuanma/1409.html">ajax load()方法传参,获取参数简单教程</a></li> <li><a href="https://blog.retao5.com/jianzhan/1408.html">laravel框架做的经典cms收集整理</a></li> <li><a href="https://blog.retao5.com/diannao/1407.html">Ventoy是一个制作可启动U盘的开源工具</a></li> </ul> <li id="tag_cloud-2" class="widget-container widget_tag_cloud"> <h3 class="widget-title">标签</h3> <div class="tagcloud"><a href="https://blog.retao5.com/tag/mysql" class="tag-link-58" title="26个话题" style="font-size: 14px;">mysql</a><a href="https://blog.retao5.com/tag/mysql%E4%BC%98%E5%8C%96" class="tag-link-59" title="19个话题" style="font-size: 14px;">mysql优化</a><a href="https://blog.retao5.com/tag/linux%E5%91%BD%E4%BB%A4" class="tag-link-16" title="13个话题" style="font-size: 14px;">linux命令</a><a href="https://blog.retao5.com/tag/php" class="tag-link-65" title="12个话题" style="font-size: 14px;">php</a><a href="https://blog.retao5.com/tag/linux" class="tag-link-13" title="11个话题" style="font-size: 14px;">linux</a><a href="https://blog.retao5.com/tag/%E9%A3%9E%E9%A3%9Ecms" class="tag-link-22" title="9个话题" style="font-size: 14px;">飞飞cms</a><a href="https://blog.retao5.com/tag/vps" class="tag-link-14" title="7个话题" style="font-size: 14px;">vps</a><a href="https://blog.retao5.com/tag/%E9%87%87%E9%9B%86" class="tag-link-20" title="7个话题" style="font-size: 14px;">采集</a><a href="https://blog.retao5.com/tag/%E6%AD%A3%E5%88%99" class="tag-link-252" title="7个话题" style="font-size: 14px;">正则</a><a href="https://blog.retao5.com/tag/mongodb" class="tag-link-674" title="7个话题" style="font-size: 14px;">mongodb</a><a href="https://blog.retao5.com/tag/%E5%B9%BF%E5%91%8A%E8%81%94%E7%9B%9F" class="tag-link-11" title="6个话题" style="font-size: 14px;">广告联盟</a><a href="https://blog.retao5.com/tag/mysql%E7%B4%A2%E5%BC%95" class="tag-link-57" title="6个话题" style="font-size: 14px;">mysql索引</a><a href="https://blog.retao5.com/tag/seo" class="tag-link-322" title="6个话题" style="font-size: 14px;">seo</a><a href="https://blog.retao5.com/tag/php%E9%87%87%E9%9B%86" class="tag-link-412" title="6个话题" style="font-size: 14px;">php采集</a><a href="https://blog.retao5.com/tag/cdn" class="tag-link-30" title="5个话题" style="font-size: 14px;">cdn</a><a href="https://blog.retao5.com/tag/nginx" class="tag-link-51" title="5个话题" style="font-size: 14px;">nginx</a><a href="https://blog.retao5.com/tag/linux%E4%BC%98%E5%8C%96" class="tag-link-181" title="5个话题" style="font-size: 14px;">linux优化</a><a href="https://blog.retao5.com/tag/%E5%89%8D%E7%AB%AF%E6%A1%86%E6%9E%B6" class="tag-link-332" title="5个话题" style="font-size: 14px;">前端框架</a><a href="https://blog.retao5.com/tag/ajax" class="tag-link-484" title="5个话题" style="font-size: 14px;">ajax</a><a href="https://blog.retao5.com/tag/vue" class="tag-link-845" title="5个话题" style="font-size: 14px;">vue</a><a href="https://blog.retao5.com/tag/%E7%A0%B4%E8%A7%A3" class="tag-link-5" title="4个话题" style="font-size: 14px;">破解</a><a href="https://blog.retao5.com/tag/%E4%BC%AA%E9%9D%99%E6%80%81" class="tag-link-43" title="4个话题" style="font-size: 14px;">伪静态</a><a href="https://blog.retao5.com/tag/502" class="tag-link-52" title="4个话题" style="font-size: 14px;">502</a><a href="https://blog.retao5.com/tag/Sphinx" class="tag-link-62" title="4个话题" style="font-size: 14px;">Sphinx</a><a href="https://blog.retao5.com/tag/%E9%A3%9E%E5%A4%A9%E4%BE%A0" class="tag-link-81" title="4个话题" style="font-size: 14px;">飞天侠</a></div> </li> </ul> </aside> <!-- #primary .widget-area --> <div class="cls"></div> </section> <!-- #main --> <div class="cls"></div> <footer id="footer" role="contentinfo"> <div id="float"> <a id="float_gotop" class="floatbtn" href="javascript:void()" onClick="goRoll(0)" title="返回顶部"></a> <a class="linbak floatbtn" href="https://blog.retao5.com/zb_system/login.php" target="_blank" title="登陆&注册"></a> <a id="float_goend" class="floatbtn" href="javascript:void()" onClick="goend()" title="转到底部"></a> </div> <div id="colophon"> <div id="site-info"> <a href="javascript:void(0)" onClick="goRoll(0)" id="goTop">返回顶部</a> &nbsp; Copyright © 热淘博客 All rights reserved.Powered by Retao5Blog. | Power By <a id="official" href="http://www.retao5.com" target="_blank">男孩礼物</a> Theme By <a href="http://www.retao5.com/" target="_blank">淘宝运营</a></div></div></footer></div> <script type="text/javascript" src="https://blog.retao5.com/zb_users/plugin/sf_praise_sdk/js/sf_praise_sdk.js"></script> <div id="bdfx"><p>分享:</p><div class="bdsharebuttonbox"><a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a><a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a><a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博"></a><a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网"></a><a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a><a href="#" class="bds_more" data-cmd="more"></a></div><script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"1","bdSize":"24"},"share":{}};with(document)0[(getElementsByTagName("head")[0]||body).appendChild(createElement("script")).src="http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion="+~(-new Date()/36e5)];</script><script type="text/javascript">$(function(){$("#modaltriggerss").leanModal({ top: 110, overlay: 0.45});});</script></div><div id="ewm"><div><p class="p_zfb">支付宝</p><p class="p_wx">微信</p><img class="zfb" src="https://blog.retao5.com/zb_users/plugin/XF_DS/image/zfb.png"/><img class="wx" src="https://blog.retao5.com/zb_users/plugin/XF_DS/image/wx.png" /></div></div><script type="text/javascript">$(function(){$("#modaltriggers").leanModal({ top: 110, overlay: 0.45});});</script></body> </html> <!--49.90 ms , 21 query , 2755kb memory , 4 error-->