[求助]关于alert的问题
Response.Write("<script>alert('点击确定关闭此窗口!')</script>");我的弹出窗口是这样写的,上面只有一个确定按钮,我想要winfrom中的MessageBox那样的效果,一个确定,一个取消,如果点的取消就不执行操作了,请问ASP。NET中能实现吗?
能的,不用alert(),用confirm()吧
比如
Button1.Attributes.Add("onclick","return confirm('您确认要关闭此窗口吗?');");
就写个事件处理程序啊
protected void Button1_Click(object sender, EventArgs e)
{
Response.Write("<script>window.close();</script>");
}
就写个事件处理程序啊
protected void Button1_Click(object sender, EventArgs e)
{
Response.Write("<script>window.close();</script>");
}