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>
我在showModalDialog里面要提交表单的
我要保证提交表单不会弹出窗口thanks!!
<frameset rows="*">
<frame src=url>
</frameset>
</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>
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>
<input type=text name=bb value="http://www.pig.com" onkeypress="rv(this.value);">