本帖最后由 qq360060316 于 2011-07-18 22:36:52 编辑

解决方案 »

  1.   

    本着医生治病不看人的原则,给出一个DEMO参考<!doctype html>
    <html>
    <head></head>
    <body><script>console.log(new Date().getTime())</script></body>
    </html>
    <script>
    var urlList=new Array();
    urlList[0]=new Array('电信下载1 [本地下载]','http://scdx.downg.com:8189//201107/PotPlayer_v1.5_build29101_wwwo_DownG.com.rar', '3000');
    urlList[1]=new Array('电信下载2 [本地下载]','http://scdx.downg.com:8189//201107/PotPlayer_v1.5_build29101_wwwo_DownG.com.rar', '3000');// 调用方法
    initLink(urlList, document.body);function initLink(urlList, parentEl) {
    for (var i = 0, ln = urlList.length; i < ln; i++) {
    var durl = urlList[i],
    aEl = document.createElement('a');

    aEl.href = 'javascript:return void(0)';
    aEl.innerHTML = durl[0];
    aEl.onclick = (function(durl) {
    return function(ev) {
    var win = window.open('');
    var a = win.location.href = (function(durl){
    return [
    'javascript:',
    'setTimeout(function(){location.href="' + durl[1] + '";},0);',
    'setTimeout(function(){window.opener=null; window.close();},' + durl[2] + ');'
    ].join('');
    })(durl);
    }
    })(durl);

    parentEl.appendChild(aEl);
    }
    }
    </script>
      

  2.   

    不提倡盗链哦
    ps.注释掉这句ie才能跑起来哦 -> console.log(new Date().getTime())