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

求一个电信网通自动选择线路的代码

[复制链接]
发表于 2008 年 1 月 29 日 21:36:27 | 显示全部楼层 |阅读模式

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

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

×
求一个电信网通自动跳转的代码,就像金光以前那样的
那位同志有的麻烦发一下....

[ 本帖最后由 破裤子 于 2008-1-29 21:43 编辑 ]
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
y
发表于 2008 年 1 月 29 日 21:44:25 | 显示全部楼层
【腾讯云】2核2G云服务器新老同享 99元/年,续费同价
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  2.     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta content="text/html; charset=gbk" http-equiv="Content-Type" />
  6. <title>test</title>

  7. <script type="text/javascript">
  8. function $(obj){
  9.   return document.getElementById(obj)?document.getElementById(obj):false;
  10. }
  11. function testTime(obj){
  12.    var testDiv=$('_testDiv');
  13.    if(!testDiv){
  14.        testDiv=document.createElement('div');
  15.        testDiv.id='_testDiv';
  16.        testDiv.style.display='none';
  17.        document.body.appendChild(testDiv);
  18.    }
  19.    var dom=document.createElement('img');
  20.    dom.setAttribute("_startTime","");
  21.    dom.src=obj.href+(obj.href.indexOf("?")==-1?'?':'&')+dom['_startTime'];
  22.    dom.setAttribute("_LinkNode","");
  23.    dom["_LinkNode"]=obj;
  24.    dom.onerror=function(){
  25.        call_testFunc(this);
  26.        var self=this;
  27.         var p=this.parentNode;
  28.         if(p){
  29.         p.removeChild(this);
  30.         var LeftDomLength=p.getElementsByTagName('img');
  31.         if(!LeftDomLength.length) p.parentNode.removeChild(p);
  32.        }
  33.    }
  34.    dom.onload=dom.onerror;
  35.    testDiv.appendChild(dom);
  36. }
  37. function call_testFunc(obj){
  38.      top.location.href=obj.href;

  39. }
  40. window.onload=function(){
  41.         var urls=document.getElementsByTagName('a');
  42.         for(var i=0,l=urls.length;i<l;i++){
  43.                 testTime(urls[i]);
  44.         }
  45.         
  46. }

  47. </script>
  48. </head>
  49. <body>
  50. <a href="http://www.baidu.com/">baidu</a>

  51. <a href="http://www.google.com/">google</a>

  52. </body>
  53. </html>
复制代码
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

y
发表于 2008 年 1 月 29 日 21:45:36 | 显示全部楼层
连接地址的页面大小保持一样
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

 楼主| 发表于 2008 年 1 月 29 日 21:50:11 | 显示全部楼层
收了,谢谢哈
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

发表于 2008 年 1 月 29 日 23:42:02 | 显示全部楼层
不厚道啊。拿了别人的邀请码,居然不回复一帖!!!


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

使用道具 举报

发表于 2008 年 1 月 30 日 00:21:52 | 显示全部楼层
不错
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025 年 2 月 4 日 04:52 , Processed in 0.029597 second(s), 21 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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