test4.htm
===================
<script>
var a = window.showModalDialog("test5.htm")
for(i=0;i<a.length;i++) alert(a[i])
</script>test5.htm
===================
<script>
function sendTo()
{
var a=new Array("a","b")
window.returnValue = a
window.close()
}
</script>
<body>
<form>
<input value="返回" type=button onclick="sendTo()">
</form>

解决方案 »

  1.   

    楼上的,早上好啊!!,你这达不到我的要求
    我在showModalDialog里面要提交表单的
    我要保证提交表单不会弹出窗口thanks!!
      

  2.   

    <html>
    <frameset rows="*">
    <frame src=url>
    </frameset>
    </html>
      

  3.   

    http://www.csdn.net/Develop/read_article.asp?id=15113showModalDialog()、showModelessDialog()方法使用详解
      

  4.   

    你把你的表单嵌在一个FRAME里不就得了。返回值的时候用parent.returnValue来实现不就行了。
      

  5.   

    <html>
      <head>
     
        <title>    </title>
      </head>
      <body >
        <iframe src="receive.php" style="srcoll:no;width:expression(document.body.offsetWidth);height:expression(document.body.offsetHeight)"></iframe>
         </body>
    </html>
      

  6.   

    我自己写的例子....
    main.htm
    ============================
    <script>
    function ckopen(){
    var msg=showModalDialog('aa2.html', '','dialogWidth:200px;dialogheight:190px;status:no;help:no');
    if ((msg!=null)&&(msg!='')) document.all.aa.value=msg;
    return msg;
    }document.onload=function s(){document.all.aa.setfocus();}
    </script><a style=cursor:hand onclick=ckopen()> open </a><input name=aa>========================================================
    aa2.htm<script>
    function rv(vlu){
    var n=document.all.kk.value=vlu;if(event.srcElement.type=='text'&&event.keyCode==13) window.returnValue =n,window.close();
    if(event.srcElement.type=='radio'|event.srcElement.type=='checkbox') window.returnValue =n,window.close();window.returnValue =n;
    close();
    }function hf(){
    for(i=0;i<document.all.tags("INPUT").length;i++)
    document.all.tags("INPUT")[i].hideFocus=true;for(i=0;i<document.all.tags("A").length;i++)
    document.all.tags("A")[i].hideFocus=true;
    }</script><body onload="hf();">
    </FORM><input type=text name=aa value="weraef" onkeypress="rv();"><br>
    <input type=text name=bb value="http://www.pig.com" onkeypress="rv();"><br><a onclick="cc.click();" style="cursor:hand";><INPUT TYPE="radio" name='cc' onclick="rv(this.value);" value="aa">aa</a><br>
    <a onclick="dd.click();" style="cursor:hand";><INPUT TYPE="radio" name='dd' onclick="rv(this.value);" value="bb">bb</a><br>
    <a onclick="ee.click();" style="cursor:hand";><INPUT TYPE="checkbox" name='ee' onclick="rv(this.value);" value="cc">cc</a><br>
    <a onclick="ff.click();" style="cursor:hand";><INPUT TYPE="checkbox" name='ff' onclick="rv(this.value);" value="submit">submit</a><br>
    link → <a style=cursor:hand;color:green onclick=rv(this.innerText)> hello </a>
    <INPUT TYPE="hidden" NAME="kk" value=''></body>
      

  7.   

    呵呵....... 以前写的. 比较烂. 高手莫笑. ^_^刚才上面的代码少了点东东... 应该改成这样. ↓<input type=text name=aa value="weraef" onkeypress="rv(this.value);"><br>
    <input type=text name=bb value="http://www.pig.com" onkeypress="rv(this.value);">