找回密码
 注册
广告投放 虚位以待【阿里云】2核2G云新老同享 99元/年,续费同价做网站就用糖果主机-sugarhosts.comJtti.com-新加坡服务器,美国服务器,香港服务器
查看: 598|回复: 4

这里太静了,发个自动选择镜像站代码

[复制链接]
发表于 2006 年 5 月 5 日 14:19:58 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

×
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>JGWY</title>
<style type="text/css">
<!--
body {
    margin: 0;
    padding: 0;
    font-size: 14px;
    color: #333;
    text-align: center;
}
#wrap {
    margin:50px auto;
    background: #FFF;
}

#wrap p{
    margin:40px 0;
}

a:link {
    color: #63b900;
    text-decoration: none;
    border-bottom: 1px dashed;
}

a:visited {
    color: #7fc937;
    text-decoration: none;
    border-bottom: 1px dashed;
}

a:hover {
    color: #cc6600;
}

a:active {
    color: #4f711f;
}

-->
</style></head>
<body>
<div id="wrap">
<p>尊敬的朋友,您好!正在为您自动选择最快的镜像服务器访问本站</p>

<p>速度测试中……</p>

<script type="text/javascript">
    i=1
    var autourl=new Array()
    autourl[1]="http://www.no-sky.com/index.php"
    autourl[2]="http://dx.no-sky.com/index.php"
    autourl[3]="http://wt.no-sky.com/index.php"
    autourl[4]="http://hk.no-sky.com/index.php"
    autourl[5]="http://mg.no-sky.com/index.php"        
    function auto(url){
    if(i){i=0;top.location=url}
    }
    function run(){
    for(var i=1;i<autourl.length;i++)  
     document.write("<img src='"+autourl+"' width=1 height=1 onerror=auto('"+autourl+"')>")
    }
    run()
</script>

<p>选择最快的镜像站点访问:</p>
<p><a href="http://www.no-sky.com/index.php">■移动主站</a> | <a href="http://dx.no-sky.com/index.php">■电信主站</a> | <a href="http://wt.no-sky.com/index.php">■网通主站</a> | <a href="http://hk.no-sky.com/index.php">■香港主站</a> | <a href="http://mg.no-sky.com/index.php">■美国主站</a></p>

</div>
</body>
</html>
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
发表于 2006 年 5 月 5 日 17:21:42 | 显示全部楼层
【腾讯云】2核2G云服务器新老同享 99元/年,续费同价
兄弟 不要误人子弟  function run是这样滴


function run(){
    for(var i=1;i<autourl.length;i++)  
     document.write("<img src='"+autourl+"' width=1 height=1 onerror=auto('"+autourl+"')>")
    }
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

发表于 2006 年 5 月 5 日 17:28:12 | 显示全部楼层
原来  是这鸟论坛给过滤掉了



  1. function run(){
  2.     for(var i=1;i<autourl.length;i++)  
  3.      document.write("<img src='"+autourl[i]+"' width=1 height=1 onerror=auto('"+autourl[i]+"')>")
  4.     }

复制代码
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

 楼主| 发表于 2006 年 5 月 6 日 15:05:03 | 显示全部楼层
晕,偶也是从别处抄来滴
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

发表于 2006 年 5 月 6 日 15:20:24 | 显示全部楼层
这样没有任何意义,要能够自动测试镜像速度并选择速度最快的镜像才行
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|金光论坛

GMT+8, 2025 年 2 月 2 日 16:35 , Processed in 0.025107 second(s), 23 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表