用window.open打开son.jsp然后在son.jsp中
window.opener.document.getElementById('returnValue').value='the value...';

解决方案 »

  1.   

    function return() 
        { 
            dialogArguments.document.getElementById("returnValue").value="asdasdasdasdasd"; 
            //var strReturn; 
            //strReturn=document.getElementById("paraFiles").value; 
           // window.returnValue =strReturn; 
            window.close(); 
        }
      

  2.   

    father.html
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
            <title>Untitled Document</title>
            <script language="javascript">
                var $ = document.getElementById;
                
                window.onload = function(){
                    var val = window.showModalDialog("son.html");
                    if (val != null) {
                        $("text1").value = val;
                    }
                }
            </script>
        </head>
        <body>
            This is my JSP page. 
            <br>
            <form id='test' action="XXX.jsp" method="post" target='_blank'>
                <input type="text" id='text1'/>
    <input type='submit' value='提交'>
            </form>
        </body>
    </html>son.html
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
            <script language="javascript">
                var $ = document.getElementById;
                function ret(){
                    window.returnValue = $("paraFiles").value;
                    window.close();
                }
            </script>
        </head>
        <body>
            <input type="text" id="paraFiles" value="">
    <INPUT onclick="ret()" type="button" value="返回">
        </body>
    </html>