调用前台js
this.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language=\"javascript\">WindowCloseReturn();</script>");
判断当前对话框是关闭还是刷新
View Code
1 window.onbeforeunload = function (event) { 2 var n = window.event.screenX - window.screenLeft; 3 var b = n > document.documentElement.scrollWidth - 20; 4 if (b && window.event.clientY < 0 || window.event.altKey) { 5 var evt = event || window.event; 6 evt.returnValue = "试卷提交将失败!确定要关闭吗?"; 7 }


浙公网安备 33010602011771号