var oForm=parent.frames['main'].document.getElementById("framename")
oForm.action="test.jsp";
oForm.submit();

解决方案 »

  1.   

    txh 
    but 错
    不是表单提交啊如何让a的 bt1 事件 触发 test() 执行啊
      

  2.   

    parent.frames['你的框架名字']或你的框架名字.document.all.test()
    parent.frames['你的框架名字']或你的框架名字.document.all.viewopt.value="洛林"PS: 没有验证过
      

  3.   

    a.htm 
    <input type=button name=bt1 onclick="dotest();">
    <script>
    function dotest(){
      self.top.frames['b'].test();//此处就调用了b.html中的test函数了
    }
    </script>b.htm
    <script language=javascript>
    viewopt="zoomin";
    function test(){
    alert("triggled by a");}
    </script>
      

  4.   

    至于赋值 你可以将b.html中的viewopt="zoomin";改为
    a.htm 
    <form>
    <input type=button name=bt1 onclick="dotest();">
    <input type=text name=textName value="11"> 
    <form>
    <script>
    function dotest(){
      self.top.frames['b'].test();//此处就调用了b.html中的test函数了
    }
    </script>b.htm
    <script language=javascript>
    viewopt=self.top.frame['a'].document.all('textName').value;//此处就是a.html中text的值11
    function test(){
    alert("triggled by a");}
    </script>
      

  5.   

    同意longshenwang(独眼龙) ,观点,longshenwang(独眼龙) 你的动作真是快