parent.leftFrame.document.getElementById("rateword");改整个src不知道如何做。但是上面的代码是在rightFrame里控制左边的leftFrame里的东西,供参考吧。

解决方案 »

  1.   

    不过貌似好像可以用target来达到?
      

  2.   

    //left.html<script language='javascript'>
     function test()
     {
      alert(window.parent.frames['main_frame'].document.getElementById('iframe1').src);
     }
    </script>
    <a onclick="test()">click here </a>
    //right.html<iframe id='iframe1' name="iframe1" height="100%" width="100%" src="http://localhost/index1.php" border="0" frameborder="0" scrolling="no"> 浏览器不支持 </iframe>
      

  3.   

    //left.html<script language='javascript'>
     function test()
     {
      window.parent.frames['main_frame'].document.getElementById('iframe1').src = 'tb2.html';
     }
    </script>
    <a onclick="test()">click here </a>
    //right.html<iframe id='iframe1' name="iframe1" height="100%" width="100%" src="tab1.html" border="0" frameborder="0" scrolling="no"> 浏览器不支持 </iframe>