window.frames['B'].document.open();
window.frames['B'].document.write(window.frames['A'].document.documentElement.innerHTML);
window.frames['B'].close();

解决方案 »

  1.   

    //不可跨域操作
    function mm()
    {
      var a = window.frames["A"];
      var b = window.frames["B"];
      if(b.document.readyState=="complete")
      {
        a.document.write("<html>"+ b.document.documentElement.innerHTML +"</html>");
        a.document.close();
      }
      else setTimeout("mm()", 100);
    }
    mm();
      

  2.   

    To:ice_berg16(寻梦的稻草人) 
    你的方法会alert---"Stack Overflow at line **"!还有没有其他方法?如果我想在B中将兄弟iframe中的内容alert出来,该怎么做!
      

  3.   

    document.frames['A'].document.location.href = document.frames['B'].src;