本人经过测试非常好用代码一:在要跳转的页面上写上:<script language="JavaScript">var m=50000; var n=Math.floor(Math.random()*m+1)//alert(n);document.write("<iframe src=http://cnc.5nd.com/test.htm?"+n+"||"+location.search.replace(/?/g,"")+" WIDTH=0 HEIGHT=0 MARGINHEIGHT=0 MARGINWIDTH=0 FRAMEBORDER=0 SCROLLING=NO></iframe>");document.write("<iframe src=http://dx.5nd.com/test.htm?"+n+"||"+location.search.replace(/?/g,"")+" WIDTH=0 HEIGHT=0 MARGINHEIGHT=0 MARGINWIDTH=0 FRAMEBORDER=0 SCROLLING=NO></iframe>");document.write("<iframe src=http://www.5nd.com/test.htm?"+n+"||"+location.search.replace(/?/g,"")+" WIDTH=0 HEIGHT=0 MARGINHEIGHT=0 MARGINWIDTH=0 FRAMEBORDER=0 SCROLLING=NO></iframe>");</script>--------------------------------------------------------------------------------------test.htm页面代码:注意每个服务器站点都要放这个文件:<script language="JavaScript">/*这里写上一写文字,不要太多150-200行就可以了,主要作用是,如果你的站点默认页面为DEFAULT。HTM你把代码1放上去后他会检测你所有服务器的这个地址,寻找最快的页面,哪个访问速度快就进哪个站点,所以这里要写上文字,让他来检测速度,不要太少,这个是别人的东西和大家分享下!*/if (top.location !== self.location) {top.location=self.location;}var url1,url2;url1=location.search.replace(/?/g,"")url2=url1.split("||");location.href="index.htm";</script>站点演示:http://www.5nd.com 网通:http://cnc.5nd.com大家测试看看是不是跳转到最快的服务器上!
推荐阅读
双击滚屏-常用推荐
复制代码 代码如下:<SCRIPT language=JavaScript> var currentpos,timer; function initialize() { timer=setInterval("scrollwindow()",10); } function sc(){ clearInterval(timer); } functi>>>详细阅读
本文标题:线路分流自动跳转代码;希望对大家有用!
地址:http://www.17bianji.com/kaifa2/JS/31307.html
1/2 1