ASP高手看看这句话少了什么?

来源:百度知道 编辑:UC知道 时间:2024/05/22 12:44:08
<%
if session("Userid")="" or session("UserName")="" then
response.write "<script language=JavaScript>" & chr(13) & "alert('您还未登陆!');"&"window.location.href = 'index.asp'"&" </script>"
Response.End
end if
if session("UserName")="" then
response.write "<script language=JavaScript>" & chr(13) & "alert('您还未填写基本信息,请填写!');"&"window.location.href = 'qiye_bcal.asp'"&" </script>"
Response.End
end if
end if
%>

修改不好了哈
帮忙看看问题错在哪里了?

多了个END IF
改成如下:
<%
if session("Userid")="" or session("UserName")="" then
response.write "<script language=JavaScript>" & chr(13) & "alert('您还未登陆!');"&"window.location.href = 'index.asp'"&" </script>"
Response.End
end if
if session("UserName")="" then
response.write "<script language=JavaScript>" & chr(13) & "alert('您还未填写基本信息,请填写!');"&"window.location.href = 'qiye_bcal.asp'"&" </script>"
Response.End
end if

%>