主题:网页跳转问题
dragon86
[专家分:0] 发布于 2007-12-23 16:10:00
在做用户登陆时有
MM_redirectLoginSuccess="index.asp"
MM_redirectLoginFailed="login.asp"
怎样让跳转到index.asp或login.asp时转到其它窗口,类似于target这个功能怎样加
回复列表 (共5个回复)
沙发
tianyu123 [专家分:2570] 发布于 2007-12-23 17:32:00
打开一个新窗口:
window.open(URL)
板凳
dragon86 [专家分:0] 发布于 2007-12-23 17:56:00
我想能不能在这两句
MM_redirectLoginSuccess="index.asp"
MM_redirectLoginFailed="login.asp"
上面修改下
或者你那种能不能给个详细的
3 楼
tianyu123 [专家分:2570] 发布于 2007-12-23 18:28:00
if 登陆成功 then
response.write"<script>window.open('index.asp');</script>"
elseif 登陆失败 then
response.write"<script>window.open('login.asp');</script>"
end if
4 楼
yt282760720 [专家分:30] 发布于 2007-12-23 20:09:00
if 登陆成功 then
response.redircte(MM_redirectLoginSuccess)
else
response.redircte(MM_redirectLoginFailed)
end if
5 楼
dragon86 [专家分:0] 发布于 2007-12-30 18:07:00
<%
' *** Validate request to log in to this site.
MM_LoginAction = Request.ServerVariables("URL")
If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" + Server.HTMLEncode(Request.QueryString)
MM_valUsername=CStr(Request.Form("yonghu"))
If MM_valUsername <> "" Then
MM_fldUserAuthorization=""
MM_redirectLoginSuccess="index.asp"
MM_redirectLoginFailed="login.asp"
MM_flag="ADODB.Recordset"
set MM_rsUser = Server.CreateObject(MM_flag)
MM_rsUser.ActiveConnection = MM_liuyan_STRING
MM_rsUser.Source = "SELECT yonghu, mima"
If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization
MM_rsUser.Source = MM_rsUser.Source & " FROM login WHERE yonghu='" & Replace(MM_valUsername,"'","''") &"' AND mima='" & Replace(Request.Form("password"),"'","''") & "'"
MM_rsUser.CursorType = 0
MM_rsUser.CursorLocation = 2
MM_rsUser.LockType = 3
MM_rsUser.Open
If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then
' username and password match - this is a valid user
Session("MM_Username") = MM_valUsername
If (MM_fldUserAuthorization <> "") Then
Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value)
Else
Session("MM_UserAuthorization") = ""
End If
if CStr(Request.QueryString("accessdenied")) <> "" And true Then
MM_redirectLoginSuccess = Request.QueryString("accessdenied")
End If
MM_rsUser.Close
Response.Redirect(MM_redirectLoginSuccess)
End If
MM_rsUser.Close
Response.Redirect(MM_redirectLoginFailed)
End If
%>
这是我的代码,我想实现在成功登陆或失败时跳到特定的单元格里,有点类似于target="123"
也跳转到123里
我来回复