showModalDialog的使用

创建: window.showModalDialog('Selladmin_Sellmoney_add.aspx', this, 'dialogWidth=600px;dialogHeight=500px;status=no;help=no');

提交不重新打开页面:在head标签中加入:<base target = "_self"> 

//关闭本页面//刷新原页面

function openWin() {
    var sRet = window.showModalDialog('Selladmin_Sellmoney_add.aspx', this, 'dialogWidth=600px;dialogHeight=500px;status=no;help=no');

if(sRet == "refresh")
{
window.location.reload();
}
}
</script>

    ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", @"<script language=javascript> window.returnValue = ""refresh"";window.close();</script>");

posted @ 2012-02-29 13:48  小草__  阅读(194)  评论(0编辑  收藏  举报