asp中response.redirect的用法

来源:百度知道 编辑:UC知道 时间:2024/06/14 00:20:24
response.Redirect("all.asp?msg="&server.urlEncode("恭喜您,修改专家信息成功!")) 这个语句是正确的 作用是显示提示信息
response.Redirect("all.asp?action=ls&noid="&id&"")这个语句也是正确的
作用是跳转到相应页面
怎么把2个redirect整合起来,当跳转到all.asp?action=ls&noid="&id&""页面时同时显示"恭喜您,修改专家信息成功!"
1楼的用过了,问题是什么都没显示出来

ASP中的response.redirect说明和用法:
1、asp中redirect方法是将浏览器重定向到另一个URL,而不是将内容发送给用户。
2、Response.Redirect 语句放在页的顶部和<HTML>标记之前,确保没有任何内容返回给浏览器。如果在返回给浏览器的内容或标题后使用 Response.Redirect,会出现错误信息。
3、如果要在页面输出信息,并进行跳转,可以使用response.write 和js代码的结合;
比如:
response.write "<script type='text/javascript'>alert('内容提交成功!');location.href='要跳转的网址url';</script>"

response.write "<script>alert('恭喜您,修改专家信息成功!');javascript:location.href='all.asp?action=ls&noid="&id&"';</script>"

测试通过~~~

response.write "<SCRIPT language=JavaScript>"
response.write "alert('恭喜您,修改专家信息成功!');"
response.write "self.location.href=all.asp?action=ls&noid="&id&"';"
response.write "</SCRIPT>"
response.end

response.Redirect ("all.asp?action=ls&noid="&id&"&msg="&server.urlEncode("恭喜您,修改