A.jsp<input type="text" name="test">
<input type="button" value="test">点击按钮,弹出窗口进入B页面
B.jsp<frameset  framespacing="0" border="false" cols="25%,75%" frameborder="yes">
<frame name="left" scrolling="auto" marginwidth="0" marginheight="0" src="c.jsp"></frame>
<frame name="main" scrolling="auto" src="d.jsp"></frame>d.jsp
<input type="button" value="ddddd">在d页面获取A页面中表单的值怎么获取,在线等。感谢~

解决方案 »

  1.   


    <frame name="main" scrolling="auto" src="d.jsp"></frame>
    d.jsp<script type="text/javascript">
        window.onload = function () {
            alert(dialogArguments.document.getElementById('txt_a').value);
        }
    </script>
    这个'txt_a'就是你想要的a.jsp的form的某个属性
      

  2.   

    或者这样B.jsp<frame iframe id='myframe' name="main" scrolling="auto" src=""></frame><SCRIPT LANGUAGE="JavaScript"> 
    window.onload = function(){ 
    var id = document.form1.id.value; //这里用你自己的form的属性 
    document.getElementById("myframe").src = "d.jsp?id=" + id; 
    }
    </SCRIPT>
      

  3.   

    //id 为B页面的值。
    function selectOrg(id){
    if(window.opener){
    window.opener.document.all.test.value = id; //先前的页面
    //window.close();
    }
    }
      

  4.   

    报js错误:dialogArguments.document为空或不是对象
      

  5.   

    建议不要用模态对话框,那是ie的函数1.htm--------------------
    <script>
    function test(){
    window.open("2.htm");
    }
    </script>
    <input type="test" name="test">
    <input type="button" value="t" onclick="javascript:test()">2.htm-------------------
    <input type="button" value="t" onclick="javascript:t()">
      

  6.   

    贴错了
    2.htm-------------------
    <script>
    alert(window.opener.document.all.test.value);
    </script>
      

  7.   


    d.jsp中加入
    <script type="text/javascript">
        window.onload = function () {
            alert(dialogArguments.document.getElementById(text).value);//
        }
    </script>
      

  8.   

    报js错误:dialogArguments.document为空或不是对象 因为你showModalDialog没有传递参数 showModalDialog(url,[document],...)把当前文档对象传给模态页 然后在模态页取 dialogArguments[0]就是为之前的父页面另外window.opener 好象 只是用于 window.open方式的
      

  9.   

    A.jsp  
    <input type="button" value="test">点击按钮,window.open()方式,弹出窗口进入B页面 
    -----------
    B.jsp 
    <frameset  framespacing="0" border="false" cols="25%,75%"    frameborder="yes">
    <frame name="left" scrolling="auto" marginwidth="0" marginheight="0" src="c.jsp"></frame>
    <frame name="main" scrolling="auto" src="d.jsp"></frame>
    ----------
    d.jsp 
    中获取A页面中的表单的值: alert(top.opener.document.getElementById("testobj").value);
    其中testobj为A.jsp中某个表单域的id
      

  10.   

    alert(top.opener.document.getElementById("testobj").value);
    其中testobj为A.jsp中某个表单域的id
      

  11.   

    在a页面跳转之前可以把值放到session里面,然后到d页面在取出来就可以了。
      

  12.   

    要是你不用js window.opener拿值,那么可以首先跳到action ,再通过请求拿值也是比较简单的啊,呵呵