asp中,登录成功后为什么没有跳转到我想跳转的页面?急!!!
代码如下:处理页面中:elseResponse.cookies("txt_username")=rs("ID")Response.cookies("txt_passwor...
代码如下:
处理页面中:
else
Response.cookies("txt_username")=rs("ID")
Response.cookies("txt_password")=rs("Password")
response.write"<SCRIPT language=JavaScript>alert('你好,你已经登录成功');"
response.write"this.location.href='index.asp';</SCRIPT>"
response.write";</SCRIPT>"
end if
%>
显示页面中:
<!--#include file="conn.asp"-->
<%
if request.Cookies("txt_username")="" then
response.Redirect("User.asp")
end if
%>
你好,用户:
<%
Response.Write(Request.Cookies("txt_username"))
%>,欢迎您的光临
登录成功后,又返回了登录页面User.asp 展开
处理页面中:
else
Response.cookies("txt_username")=rs("ID")
Response.cookies("txt_password")=rs("Password")
response.write"<SCRIPT language=JavaScript>alert('你好,你已经登录成功');"
response.write"this.location.href='index.asp';</SCRIPT>"
response.write";</SCRIPT>"
end if
%>
显示页面中:
<!--#include file="conn.asp"-->
<%
if request.Cookies("txt_username")="" then
response.Redirect("User.asp")
end if
%>
你好,用户:
<%
Response.Write(Request.Cookies("txt_username"))
%>,欢迎您的光临
登录成功后,又返回了登录页面User.asp 展开
展开全部
处理页面中:
else
Response.cookies("txt_username")=rs("ID")
Response.cookies("txt_password")=rs("Password")
response.write"<SCRIPT language=JavaScript>alert('你好,你已经登录成功');"
response.write"this.location.href='index.asp';</SCRIPT>"
response.write";</SCRIPT>"
end if
%>
改成
else
Response.cookies("txt_username")=rs("ID")
Response.cookies("txt_password")=rs("Password")
response.write"<SCRIPT>alert('你好,你已经登录成功');location.href='index.asp';</SCRIPT>"
response.end()
end if
%>
else
Response.cookies("txt_username")=rs("ID")
Response.cookies("txt_password")=rs("Password")
response.write"<SCRIPT language=JavaScript>alert('你好,你已经登录成功');"
response.write"this.location.href='index.asp';</SCRIPT>"
response.write";</SCRIPT>"
end if
%>
改成
else
Response.cookies("txt_username")=rs("ID")
Response.cookies("txt_password")=rs("Password")
response.write"<SCRIPT>alert('你好,你已经登录成功');location.href='index.asp';</SCRIPT>"
response.end()
end if
%>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询