window.showModalDialog("页面地址",window.document,"dialogWidth=600px;dialogHeight=500px");

解决方案 »

  1.   

    <!---main----->
    <html>
    <BODY>
    <form name="form1">
    <input type="button" value="click me and open a dialog window" onclick="ShowDialog()"/>
    <input type="textbox" name="txt1" width="200"/> 
    </form>
    </BODY>
    </html>
    <script language="JavaScript">
    function ShowDialog()
    {
    document.form1.txt1.value=window.showModalDialog("Dialog.html");
    }
    </script>
    <!----Dialog.html------->
    <html>
    <base target="_self">
    <BODY>
    <form name="form1">
    <input type="textbox" name="txt1" width="200"/>
    <input type="button" value="return" onclick="ReturnValue()"/>
    <a href="http://www.google.cn">gooooogle</a>
    </form>
    </BODY>
    </HTML>
    <script>
    function ReturnValue()
    {
    window.returnValue=document.form1.txt1.value;
    window.close();
    }
    </script>
      

  2.   

     GT7466 
    请问如果打开的子窗口里边是文字链接,能把对应文字的ID传到父窗口里吗?
      

  3.   

    http://topic.csdn.net/u/20080229/09/c973ec0b-b4e4-42be-b34c-70591c1849e4.html
      

  4.   

    window.returnValue  这个是子窗口的返回值,要具体返回什么,对它赋值就可以了.
    把文字的ID赋给它就行了.