父窗口打开模式窗口
模式窗口返回array:
var url="";
var width=900;
var height=800;
var top=(window.screen.height-height)/2;
var left=(window.screen.width-width)/2;//居中
var diaPraram = "dialogWidth:"+width+"px;dialogHeight:"+height+"px;dialogTop:"+top+"px;dialogLeft:"+left+"px";diaPraram += "status:yes;scroll:yes;help:no;resizable:no;"
ReturnValue = window.showModalDialog(url,window,diaPraram);
if(typeof(ReturnValue)!="undefined"){ //当返回值不是未定义的时候取返回值,防止关闭窗口未返回值的时候报错
var id=ReturnValue[0];
var name=ReturnValue[1];
}
模式窗口返回array:
var array = new Array(id,name);
window.returnValue =array;
window.close();