原文链接:https://www.jb51.net/article/35046.htm
protected void Page_Load(object sender, EventArgs e) { Button1.Attributes.Add("onclick", "return confirm('确定要删吗?');"); Response.Write("<Script Language='JavaScript'>window.alert('111');</script>"); Response.Write("<Script Language='JavaScript'>if ( window.confirm('222')) { window.location.href='222' } else {window.location.href='222' };</script>"); Response.Write("<script>alert('删除成功!');window.location.href ='www.baidu.com'</script>"); //ASP.NET 服务器控件在 Page 中发出客户端脚本块: Page.RegisterStartupScript("hello", "<script>alert('你好!')</script>"); }
标签:ASP,href,Write,window,弹出,NET,222 From: https://www.cnblogs.com/zhu4c4/p/16991329.html