网页中弹出消息框
用HTML,javascript,C#语言都行,完成在一个页面弹出一个只有确定按钮的消息框,要在当前网页出现,不要后面是白屏的,
如Response.Write("<script>alert('你要给出的消息。');</script>");等等,请教了,谢谢,如果给的全点更好!
[解决办法]
String csname1 = "PopupScript1"; Type cstype = this.GetType(); ClientScriptManager cs = Page.ClientScript; if (!cs.IsStartupScriptRegistered(cstype, csname1)) { String cstext1 = "alert('用户或密码不正确!');"; cs.RegisterStartupScript(cstype, csname1, cstext1, true); }
[解决办法]
this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "key", "alert('添加成功!');", true);
不会空白的,有没有试啊!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[解决办法]
Page.RegisterStartupScript("", "<script>alert('填写不能有空!请认真填写!');</script>");