页面自动关闭的问题???
我在maiform里弹出一个对话框
Dim mPathofSubWindow As String
mPathofSubWindow = "date1.aspx "
scriptString = " <script language=JavaScript> " & _
"var postFlag = window.showModalDialog( ' " & mPathofSubWindow & "?date= " & Date.Now & " ', " & _
"window, 'dialogWidth:300px;dialogHeight:350px;help:no;resizable:No;status:No;scroll:off; " & _
"dialogLeft: " & tmpX & "px;dialogTop: " & tmpY & "px '); if(postFlag != undefined){ if(postFlag[0] == 'T '){window.document.forms[0].submit();}} " & _
"eval(window.document.all. " & Me.TextBox1.ClientID & ").focus(); " & _
" </script> "
If (Not Page.IsStartupScriptRegistered( "DateInput_clientScript ")) Then
Page.RegisterStartupScript( "DateInput_clientScript ", scriptString)
End If
在弹出的页面里再自己关闭
Dim scriptString As String
scriptString = " <script language=JavaScript> " & _
"window.close();return false; " & _
" </script> "
Page.RegisterStartupScript( "DateInput_clientScript ", scriptString)
当我再对话框中关闭页面时,却把整个data1.aspx弹出来
不知道什么原因
哪位高手指点一下
谢谢
[解决办法]
在子頁面這樣寫:
Response.Write( " <script language=javascript> window.close(); </script> ");