asp.net窗体的打开和关闭 (转)

it2022-05-08  6

//打开新的窗体

Response.Redirect("WebMain.aspx");   

//弹出一个新窗体

Response.Write("<script>window.open(\"WebMain.aspx\")</script>")

//弹出一个只有确定按钮的提示框

Response.Write("<script>alert(\"用户名或密码错误\");</script>");

//关闭窗体不提示信息

Response.Write("<script>window.opener=null;window.close();</script>");

//关闭窗体提示一条信息

Response.Write("<script>window.close();</script>");

//关闭窗体提示两条信息

Response.Write("<script>if(confirm(\"确定退出?\")==true){window.close();}</script>");

转载于:https://www.cnblogs.com/coolylh/archive/2005/11/25/284432.html

相关资源:JAVA上百实例源码以及开源项目

最新回复(0)