这个问题,之前我有帮人解决过...如果,你是用的框架FRAME的话,你可以把那个异域的网页包含在一个框架下面,而这个异域地址的页面是属于window.top或是window.parent的,而window.top或window.parent是归我管的,想怎么刷就怎么刷...如果是用window.open来打开的新窗口,也可以用一个框架把它包含起来...懂不???呵呵....

解决方案 »

  1.   

    不是特别明白!
    我是包含在框架里的,框架里两个frame,一个是我自己的html,一个是异域html
    我用
    window.parent.frame[1].location.reload()就权限错误
      

  2.   

    <html>
    <head>
    </head>
    <body topmargin="0" leftmargin="0">
    <iframe src="http://www.sina.com.cn" name="sina" id="sina" width="100%" height="100%"></iframe>
    <script>
    //现在,想要刷这个IFRAME的话,可以
    window.location.reload();
    </script>
    </body>
    </html>
      

  3.   

    其实具体情况比这复杂,那个异域地址自己本身也是一个框架,我要刷新异域地址页面的其中一个frame
    所以应该是
    var mainframe=window.parent.frame[1];
    mainframe.frame[1].location.reload();
    这就是我的代码,IE提示,没有权限
      

  4.   

    说实话,什么NS,FF,全TMD垃圾。一点都不正统,还想要打着什么抵制MS,真是搞笑异域的,实在是没办法,只能这样变通的刷一刷
      

  5.   

    不是我不想变通,如果这样的话,还不如直接给IE发送6042消息,让IE去刷,这样想怎么刷就怎么刷,但问题是那个框架页只要一刷,就会退出到未登陆状态
      

  6.   

    这个问题不局限于用JS解决,只要能解决,什么方法都可以!求实现刷新异域框架页面中某个frame的实现方法!
      

  7.   

    用HTA...
    HTA的权限很高,你可以爱咋咋地...
      

  8.   

    牛叉兄,HTA没搞过,能否帖下代码?在下感激不尽,分儿双倍奉上
      

  9.   

    HTA也不大好用的,关键在于,它并不能算是一个页面,是一个应用程序....
      

  10.   

    在HTA中你想如何控制都行,别家的跟自家的是一样的亲
    //
    <input onkeypress="if(event.keyCode == 13)createwin(800,500,this.value)" id=urlinput value="http://" style="width:100%;" title="id=urlinput;请在此输入网页地址;窗口ID=win">
    <textarea style="width:100%;height:100%" id=command title="id=command 弹出窗口ID=win 全局JS窗口:jsweb;在此输入命令后按右键运行" oncontextmenu='eval(this.value)'>jsweb.document.open();
    jsweb.document.write(
                          '<script' + '>\n'               
                         +'var topwin = null;\n'
                         +'</script' + '>\n'
                         );
    jsweb.topwin = window;
    jsweb.document.write(js.value);
    jsweb.document.close();
    </textarea>
    <textarea id=js style="width:100%;height:100%;" title="id=js">
    <script>
    function unload(){
          try{
              if(topwin.win.document.body.readyState == "complete"){  
               if(topwin.win.status == "qidizi")return false;      
               var wa = topwin.win.document.all;
               for(var i = 0; i < wa.length;i++){
                 wa[i].style.display = "";
                 wa[i].style.color = "black";
               }
               topwin.win.status = "qidizi";
              } 
          }catch(e){;}
    }
    setInterval("unload()",1000);</script>///取消所有的禁止alleventnull();
    //用于解除西南之窗的播放器右键的禁止(先在支付影币的窗口按CTRL+I;然后放入弹出的TEXTAREA中,右键)
    this.parentElement.style.top = 50;
    document.links[0].outerHTML = document.links[0].outerHTML.replace("window.open","o = window.open");
    //o.frames[0].location.href = o.frames[0].msplayer.SourceLink;;</textarea>
    <script language ='javascript'>
    <!--
    var win = null;
    function createwin(w,h,u){
            try{
                win.location.href = u;
            }catch(e){
               win = window.open("",'xwin','width=' + w + ',height=' + h + ',menubar=no,toolbar=no,location=yes,directories=no,status=yes,scrollbars=yes,resizable=yes');
               win.location.href = u;
             }
    }function alleventnull(){
          win.window.onerror = null;
          win.document.oncontextmenu = null;
          win.document.onkeydown = null;
          win.document.ondragstart= null;
          win.document.onmousedown= null;
          win.window.onmousedown = null
          win.document.body.oncontextmenu = null;
          win.document.body.onkeydown = null;
          win.document.body.ondragstart= null;
          win.document.body.onmousedown= null;
    }function forx(n)
    {
     if(n == null) return false;
     js.value = "";
     for (var v in eval(n))
     {
         js.value += n + '.' + v + ' = ' + eval( n + '.' + v) + '\n';
     }
    }
    //-->
    </script>
      

  11.   

    <input type=button value="refresh sina page" onclick="window.open('http://www.sina.com.cn','sina')">
    <iframe src="http://www.sina.com.cn" name="sina" id="sina" width="100%" height="100%"></iframe>
      

  12.   

    楼上的,你帖的这段代码什么?不知所云,连HTA的定义都没有
      

  13.   

    JK的代码有可取之处,我们可以设定window.open方法或是超链接的target到目标的异域网页的FRAME名称上去,而URL就是那个框架的URL,这样等于是重载了一下,但是好不好,看楼主的了....设定target到FRAME名上...祝你好运....
      

  14.   

    楼上的都还没明白我的意思,假设sina打开后也是一个框架,我要刷新sina右边的frame