confirm提示框问题
这是程序中的一段,出现的问题是:当弹出提示框,还没等用户点确定或取消,下面的程序就已经执行了大家帮的看看怎么样改才能正常啊?
if (e.CommandName == "delete")
{
Response.Write("<script defer>confirm('确定删除吗?');</script>");
{
string str_delete = "delete lab_major where major_num='" + majornum + "'";
co_major.ENQ(str_delete);
string str_delete1 = "select * from lab_major";
co_major.dg_Bind(str_delete1, DataGrid1);
}
}