当前a页面的frame id是designform,它的src="../../fceform/design",如何访问design.htm的frameset框架中的id=topic的frame。
<html >
    <head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
        <TITLE>a页面</TITLE> </head>
<body onresize="window_onresize()">
<div id=oTitle style="position:absolute;top:0px;left:0px;height:30px;width:100%">
            <iframe  width=100% height=100% id="toolbar" name="toolbar" src="wizardtb.htm" scrolling=auto frameborder=0  bordercolor=LightGrey noresize></iframe>
</div>
<div id=oBody style="position:absolute;left:0px;top:32px;height:793px;" >
        <iframe  width=100% height=100% id="mainform" name="mainform"  src="../../fceform/common/null.htm" scrolling=auto frameborder=0  bordercolor=LightGrey noresize></iframe>
    </div>
<div style="position:absolute;display:none;" >
    <frame id="designform" src="../../fceform/design/<html >
    <head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
         </head>
<body onresize="window_onresize()">
<div id=oTitle style="position:absolute;top:0px;left:0px;height:30px;width:100%">
            <iframe  width=100% height=100% id="toolbar" name="toolbar" src="wizardtb.htm" scrolling=auto frameborder=0  bordercolor=LightGrey noresize></iframe>
</div>
<div id=oBody style="position:absolute;left:0px;top:32px;height:793px;" >
        <iframe  width=100% height=100% id="mainform" name="mainform"  src="../../fceform/common/null.htm" scrolling=auto frameborder=0  bordercolor=LightGrey noresize></iframe>
    </div>
<div style="position:absolute;display:none;" >
    <frame id="designform" src="../../fceform/design/design.htm" scrolling=auto frameborder=0  bordercolor=LightGrey noresize>
    </div>
</body>
 
</html>" scrolling=auto frameborder=0  bordercolor=LightGrey noresize>
    </div>
</body>
 
</html><HTML >
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<TITLE>design页面</TITLE>
</HEAD>
<frameset rows=56,89%,0 frameborder=1 border=0 id=eformmain name=eformmain>
<frame id="menu" src="menutoolbar.htm" scrolling=no border=0 frameborder=1  resize >
<!-- <frame id="topic" name="rightmain" src="layout.htm"  scrolling=auto border=0  frameborder=1  bordercolor=LightGrey marginwidth=1 noresize>
-->
<frameset id=main1 cols=0,100%  resize frameborder="0" framespacing="2">
<frame id="objlist" src="objlist.htm" scrolling=no  resize style="border-right: 1px #00a3e4 solid">
<frameset id=main2 rows="*,27"  border=0 resize style="border-left: 1px #00a3e4 solid">
<frame id="topic" name="rightmain" src="layout.htm"  scrolling=auto border=0 frameborder=0 bordercolor=LightGrey marginwidth=1 resize>
<frame id="selhtml" src="selhtml.htm" scrolling=no border=0 frameborder=0  resize >
</frameset> </frameset></frameset></HTML>

解决方案 »

  1.   

    你这代码贴乱了吧,应该是有两个页面
    一个是包涵designform 的页面
    <div style="position:absolute;display:none;" >
    <frame id="designform" src="../../fceform/design/design.htm" scrolling=auto frameborder=0 bordercolor=LightGrey noresize>
    </div>
    一个是
    design.htm 的内容页面吧
    这里包涵frameset。
    获取直接可以用document.getElementById("topic").document.getElementById("ttt")(取对象)或者.test()(topic里js方法);
      

  2.   

    document.getElementById("topic").document.getElementById("ttt")
    这个应该是可以的。
      

  3.   

    我是想在a页面中用js获取design.htm文件中的frameid是topic的对象
      

  4.   

    a页面中的frame中src="../../fceform/design/design.htm"代码如下:
    <div style="position:absolute;display:none;" >
    <frame id="designform" src="../../fceform/design/design.htm" scrolling=auto frameborder=0 bordercolor=LightGrey noresize>
    </div>
    a页面如何获取自己页面中frame中的design.htm页面中的id是topic的frame对象,design.htm的代码如下:<frameset rows=56,89%,0 frameborder=1 border=0 id=eformmain name=eformmain>
    <frame id="menu" src="menutoolbar.htm" scrolling=no border=0 frameborder=1 resize >
    <!-- <frame id="topic" name="rightmain" src="layout.htm" scrolling=auto border=0 frameborder=1 bordercolor=LightGrey marginwidth=1 noresize>
    -->
    <frameset id=main1 cols=0,100% resize frameborder="0" framespacing="2">
    <frame id="objlist" src="objlist.htm" scrolling=no resize style="border-right: 1px #00a3e4 solid">
    <frameset id=main2 rows="*,27" border=0 resize style="border-left: 1px #00a3e4 solid">
    <frame id="topic" name="rightmain" src="layout.htm" scrolling=auto border=0 frameborder=0 bordercolor=LightGrey marginwidth=1 resize>
    <frame id="selhtml" src="selhtml.htm" scrolling=no border=0 frameborder=0 resize >
    </frameset></frameset></frameset>