Main.aspx页:
- HTML code
<frameset onload="setsize();" id="mm" border="0" name="mm" frameSpacing="0" rows="110,*" frameBorder="no" scrolling="no" > <frame name="top" src="top.aspx" noResize scrolling="no" target="middle" > <frame name="middle" src="Main.htm" scrolling="no" id="middle" target="bottom"> </frameset>
main.htm页:
- HTML code
<script>document.write("<frameset cols='171,10,*' rows='*' frameborder='no' border='0' id='oa_frame' scrolling='no'>");document.write("<frame src='LeftMenuTest.aspx' name=leftarea MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING='no' noresize>");document.write("<frame name=middleframe src='go_left.htm' scrolling='NO' frameborder='NO' noresize>");//document.write("<frame src='_middle.htm' name='mFrame' scrolling='No' noresize='noresize' id='mFrame' />");document.write("<frame src='RightMenu.aspx' name=main id=[color=#FF0000]main[/color] MARGINWIDTH=0 MARGINHEIGHT=0 frameborder='no' scrolling='auto' noresize>");document.write("</frameset>");</script>
问在Main.aspx页内怎么找到main.htm中的main?
如在'LeftMenuTest.aspx'页中设置main.htm中的main的url为:
parent.main.location.href=url;
试了
parent.document.getElementById("mm").childNodes[1].main.location.href = url;
不行
------解决方案--------------------------------------------------------
LeftMenuTest.aspx
parent.window.frames['main'].location.href='';