asp编译问题

来源:百度知道 编辑:UC知道 时间:2024/09/23 02:20:43
请问如果在if then else中用了页面跳转,跳转后还有否执行end if后面的语句.
如:
if i=0 then
response.write "<script language='javascript'>window.location.href='index.asp'"
else
response.write "<script language='javascript'>window.location.href='index2.asp'"
end if
response.write "<script language='javascript'>window.location.href='index3.asp'"
....

像你上面的代码,会执行end if后面的语句。因为跳转时发生在客户端的,脚本已经执行完毕。

if i = 0 then
Response.Redirect(index.asp)
else...

这样的就不会执行。

不执行了。

你的代码太乱了
检查一下你的If语句的结构就知道了
应该是不执行了

用response.end终止一下。