Response.Write("<script>alert('注册成功!默认密码已发送到您手机,请用此密码第一次登录');</script>");
return;
Response.Redirect("/login.aspx");谈出对话框后,停留在原页面,Debug以后,发现return 之后就直接跳出来了,把return去掉,前台没有alert,请问该怎么写!!
return;
Response.Redirect("/login.aspx");谈出对话框后,停留在原页面,Debug以后,发现return 之后就直接跳出来了,把return去掉,前台没有alert,请问该怎么写!!
ScriptManager.RegisterStartupScript(this, Page.GetType(), "Success", "alert('注册成功!默认密码已发送到您手机,请用此密码第一次登录');location.replace('Login.aspx');", true);
Response.Write("<script language=javascript>alert('注册成功!默认密码已发送到您手机,请用此密码第一次登录');window.location.href='/login.aspx';</script>");试一下
return当然不执行Response.Redirect("/login.aspx"); 2.把return去掉,前台没有alert
因为程序走到了Response.Redirect("/login.aspx"); 所以之前的alert执行后立刻跳转 所以看起来似乎无效果.
<script language='javascript'>alert('注册成功!');window.location='url';</script>