window.opener.parent.document.frames.item('leftFrame').location='menu.action';
这句话在IE浏览器中可以实现,在火狐浏览器中不能实现。请问在火狐浏览器中如何实现刷新父类窗口左边的树形菜单

解决方案 »

  1.   


    window.opener.parent.document.frames['leftFrame'].location='menu.action';//frame问题    
    以下面的frame为例:    
    <frame src="xxx.html" mce_src="xxx.html" id="frameId" name="frameName" />    
    (1)访问frame对象:    
    IE:使用window.frameId或者window.frameName来访问这个frame对象. frameId和frameName可以同名。    
    FF:只能使用window.frameName来访问这个frame对象.    
    另外,在IE和Firefox中都可以使用window.document.getElementById("frameId")来访问这个frame对象.    
    (2)切换frame内容:    
    在IE和Firefox中都可以使用window.document.getElementById("testFrame").src = "xxx.html"或window.frameName.location = "xxx.html"来切换frame的内容.    
    如果需要将frame中的参数传回父窗口(注意不是opener,而是parent frame),可以在frme中使用parent来访问父窗口。例如:window.parent.document.form1.filename.value="Aqing";    
    本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/IBM_hoojo/archive/2010/07/02/5708440.aspx