假設ParentForm
點擊Open按鈕彈出SubForm
點擊Close按鈕關閉SubForm
父窗體前台代碼
<script type="text/javascript">
function OpenSubForm(ret) {
var strPath = "subForm
var nHeight =
var nWidth =
var feature
feature = "Height= " + nHeight + "
feature += "
window
return false;
}
</script>
父窗體後台代碼
private void Page_Load(object sender
{
// ページを初期化するユーザー コードをここに挿入します
this
}
子窗體後台代碼
private void Button
{
string strScript =string
string strRetForm = String
string strRetValue=String
strRetForm=Request
strRetValue=Request
if (strRetForm == string
{
strRetForm= "document
}
strScript = "<script language=javascript>";
strScript += "window
strScript += "
strScript += "window
strScript += "</script>";
Response
}
From:http://tw.wingwit.com/Article/program/net/201311/14265.html