日期:2014-05-16  浏览次数:20467 次

js框架页的引用
主页面:main.html<frameset rows="157,*,11" frameborder="no" border="0" framespacing="0">
  <frame src="top.html" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" />
  <frame src="center.html" name="mainFrame" id="mainFrame" />
  <frame src="down.html" name="bottomFrame" scrolling="No" noresize="noresize" id="bottomFrame" />
</frameset>

center.html页面:
<iframe height="100%" width="100%" border="0" frameborder="0" src="4.html" name="leftFrame" id="leftFrame" 
title="leftFrame"></iframe
<iframe height="100%" width="100%" border="0" frameborder="0" src="right.html" name="rightFrame" id="rightFrame" title="rightFrame"></iframe>

我想在top.html页面实现:center.html的左右iframe页面的变换

请问,这样有方法可以实现吗?

------解决方案--------------------
parent.window.frames.mainFrame.document.getElementById('leftFrame').src = 'right.html';

parent.window.frames.mainFrame.document.getElementById('rightFrame').src = '4.html';