
 新建父窗口页面:
加入以下脚本
 代码如下:
 First
function ShowDialog(Url) 
{ 
 var iWidth=560; //模态窗口宽度
 var iHeight=300;//模态窗口高度
 var iTop=(window.screen.height-iHeight-100)/2;
 var iLeft=(window.screen.width-iWidth)/2;
 var returnValue=window.showModalDialog(Url, "newwindow", "dialogHeight:"+iHeight+"px; dialogWidth:"+iWidth+"px; toolbar:no; menubar:no; scrollbars:no; resizable:no; location:no; status:no;left:200px;top:100px;");
 document.getElementById("TextBox1").innerText=returnValue;
} 
 script>
 
创建second.html页面:
 代码如下:
 second
 -->
 function closeDiag()
 {
 window.opener=null;
 window.close();
 } 
 function OK()
 {
 var Value=document.getElementsByName("myRadio");
 for(var i=0;i
 {
 if(Value[i].checked)
 { 
 window.returnValue = Value[i].value;
 window.close();
 }
 else
 {
 document.getElementById("Lab_Info").innerText="没有选中项,请选择!";
 }
 } 
 } 
 script>