自动打开最快镜像站

  如果一个网站有多个镜像站的话,使用本文的方法可以使得用户自动跳转到其访问速度最快的那个镜像站上。

直接将下面代码加入到<body></body>中
<script>
i=1
var autourl=new Array()
autourl[1]=”www.fightfly.com”
autourl[2]=”www.homewife.cn”
autourl[3]=”www.fightfly.com”
function auto(url){if(i){i=0;top.location=url}}
function run(){for(var i=1;i<autourl.length;i++)document.write(“<img src=http://”+autourl+” width=1 height=1 onerror=auto(‘http://”+autourl+”‘)>”)}
run()
</script>

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理

相关文章

开始在上面输入您的搜索词,然后按回车进行搜索。按ESC取消。

返回顶部