关于页面提示及跳转

lawrendc 2011-11-30 11:22:47
Hi,各位,我现在想实现的是密码更改页面提交成功后,弹出提示信息,我是用的

response.Write("<script language='javascript'>alert('添加成功!!!')</script>")

然后页面跳转到另一个页面比如index.asp

response.Redirect("index.asp")

但是这样的话,就直接跳转不会弹出提示信息了,为什么
...全文
55 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
lawrendc 2011-11-30
  • 打赏
  • 举报
回复
好 谢谢两位
zy0071982 2011-11-30
  • 打赏
  • 举报
回复
Response.Write "<script>alert('1111');window.location.href='http://www.baidu.com';</script>"
hookee 2011-11-30
  • 打赏
  • 举报
回复
response.Write("<script language='javascript'>alert('添加成功!!!');location.href='index.asp';</script>")
不要response.Redirect了
response.Redirect相当于浏览器重新发出index.asp的请求,把之前的Write覆盖了
设置 Response.Buffer = False,可以看到这样做是错的

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧