父窗体js代码(打开子窗体):
1 <script type="text/javascript">
2 //打开模式对话框 取得返回值
3 function OpenModalDialog() {
4 //用一个value来接受返回值
5 var value = window.showModalDialog("ModalDialogChild.aspx", "ModalDialog", "dialogWidth=800px; dialogHeight=1000px; center:Yes; Help:No; Resizable:No; Status:no; edge:sunken");
6 $("#txtMsg").val(value);
7 }
8
9 //通过window.open打开窗体 取得返回值
10 function OpenWin() {
11 window.open("winChild.aspx", "window", "height=800,width=1000,top=0,left=0,toolbar=no,menubar=no,scrollbars=no,location=no,status=no");
12 }
13 </script>
2 //打开模式对话框 取得返回值
3 function OpenModalDialog() {
4 //用一个value来接受返回值
5 var value = window.showModalDialog("ModalDialogChild.aspx", "ModalDialog", "dialogWidth=800px; dialogHeight=1000px; center:Yes; Help:No; Resizable:No; Status:no; edge:sunken");
6 $("#txtMsg").val(value);
7 }
8
9 //通过window.open打开窗体 取得返回值
10 function OpenWin() {
11 window.open("winChild.aspx", "window", "height=800,width=1000,top=0,left=0,toolbar=no,menubar=no,scrollbars=no,location=no,status=no");
12 }
13 </script>