一个包括框架的网页,上、下结构。上边如何用JS来为下边的一个文本框赋值?

解决方案 »

  1.   

    self.parent.frames["下框架的名称"].document.getElementById("下框架中页面元素ID").value="什么什么"
      

  2.   

    window.parent.下边框架的名称.location=xxx.html?a=&b=
    可以通过地址栏来进行传值过去,然后进行赋值
      

  3.   

    top.下框架name.document.forms[0].xx.value = "xxxx";
      

  4.   

    我的框架是这样的。
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>无标题文档</title>
    </head><frameset rows="80,*" cols="*" framespacing="0" frameborder="no" border="0">
      <frame src="top.html" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" title="topFrame" />
      <frameset rows="*" cols="241,*" framespacing="0" frameborder="no" border="0">
        <frame src="left.html" name="leftFrame" scrolling="No" noresize="noresize" id="leftFrame" title="leftFrame" />
        <frame src="right.html" name="mainFrame" id="mainFrame" title="mainFrame" />
      </frameset>
    </frameset>
    <noframes><body>
    </body>
    </noframes></html>
      

  5.   

    各位朋友们帮我看看应该怎么写?是在top.html里边写吗?
      

  6.   

    top.mainFrame.document.getElementById("右下框架中页面元素ID").value="AAAAAAAAAAAAAA"
      

  7.   


    top是什么?我的一个按扭在top.html里边。想right.html内的文本框赋值。
      

  8.   

    top.mainFrame.doument.forms[0].xxx.value="xxx";
    top指包含<frameset>代码的最外层窗口,通过top.xxx引用其他框架窗口
      

  9.   


    朋友,XXX.HTML?a=xxx&b=XXXX这样传值?HTML怎么获取这些值?用Javascript?