分类：电脑/网络-互联网-上网帮助
问题：会员登陆时,登陆成功和失败怎么才能弹出对话框?急急急急急急!!! 
<%@LANGUAGE="SCRIPT" CODEPAGE="936"%><!--#include file="Connections/ p" --><%Dim Recordset1__MMColParamRecordset1__MMColParam = "1"If (Session("MM_Username") <> "") Then   Recordset1__MMColParam = Session("MM_Username")End If%><%Dim Records<%@LANGUAGE="SCRIPT" CODEPAGE="936"%><!--#include file="Connections/ p" --><%Dim Recordset1__MMColParamRecordset1__MMColParam = "1"If (Session("MM_Username") <> "") Then   Recordset1__MMColParam = Session("MM_Username")End If%><%Dim Recordset1Dim Recordset1_numRowsSet Recordset1 = Server.CreateObject("ADODB.Recordset")Recordset1.ActiveConnection = MM_conn_STRINGRecordset1.Source = "SELECT UserID, Password FROM Users WHERE UserID = '" + Replace(Recordset1__MMColParam, "'", "''") + "'"Recordset1.CursorType = 0Recordset1.CursorLocation = 2Recordset1.LockType = 1Recordset1.Open()Recordset1_numRows = 0%><%MM_LoginAction = Request.ServerVariables("URL")If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" + Server.HTMLEncode(Request.QueryString)MM_valUsername=CStr(Request.Form("UserID"))If MM_valUsername <> "" Then  MM_fldUserAuthorization=""  MM_redirectLoginSuccess=" p"  MM_redirectLoginFailed=" p"  MM_flag="ADODB.Recordset"  set MM_rsUser = Server.CreateObject(MM_flag)  MM_rsUser.ActiveConnection = MM_conn_STRING  MM_rsUser.Source = "SELECT UserID, Password"  If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization  MM_rsUser.Source = MM_rsUser.Source & " FROM Users WHERE UserID='" & Replace(MM_valUsername,"'","''") &"' AND Password='" & 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       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 false 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%><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>无标题文档</title></head><body><form id="form1" name="form1" method="POST" action="<%=MM_LoginAction%>">  <table width="500" border="0" align="center">    <tr>      <td align="right">用户名:</td>      <td><input name="UserID" type="text" id="UserID" /></td>    </tr>    <tr>      <td align="right">密码:</td>      <td><input name="Password" type="password" id="Password" /></td>    </tr>    <tr>      <td align="right"> </td>      <td><input type="submit" name="Submit" value="提交" />      <input type="submit" name="Submit2" value="提交" /></td>    </tr>  </table></form></body></html><%Recordset1.Close()Set Recordset1 = Nothing%>
回答：试试:<%@LANGUAGE="SCRIPT" CODEPAGE="936"%><!--#include file="Connections/ p" --><%Dim Recordset1__MMColParamRecordset1__MMColParam = "1"If (Session("MM_Username") <> "") Then   Recordset1__MMColParam = Session("MM_Username")End If%><%Dim Recordset1Dim Recordset1_numRowsSet Recordset1 = Server.CreateObject("ADODB.Recordset")Recordset1.ActiveConnection = MM_conn_STRINGRecordset1.Source = "SELECT UserID, Password FROM Users WHERE UserID = '" + Replace(Recordset1__MMColParam, "'", "''") + "'"Recordset1.CursorType = 0Recordset1.CursorLocation = 2Recordset1.LockType = 1Recordset1.Open()Recordset1_numRows = 0%><%MM_LoginAction = Request.ServerVariables("URL")If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" + Server.HTMLEncode(Request.QueryString)MM_valUsername=CStr(Request.Form("UserID"))If MM_valUsername <> "" Then  MM_fldUserAuthorization=""  MM_redirectLoginSuccess=" p"  MM_redirectLoginFailed=" p"  MM_flag="ADODB.Recordset"  set MM_rsUser = Server.CreateObject(MM_flag)  MM_rsUser.ActiveConnection = MM_conn_STRING  MM_rsUser.Source = "SELECT UserID, Password"  If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization  MM_rsUser.Source = MM_rsUser.Source & " FROM Users WHERE UserID='" & Replace(MM_valUsername,"'","''") &"' AND Password='" & 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       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 false Then      MM_redirectLoginSuccess = Request.QueryString("accessdenied")    End If''''以下是修改处%><script language=javascript>alert('登陆成功')</script><%    MM_rsUser.Close    Response.Redirect(MM_redirectLoginSuccess)      else%><script language=javascript>alert('登陆失败'); ef='javascript: ck()';</script><%  '''修改处结束  End If  MM_rsUser.Close  Response.Redirect(MM_redirectLoginFailed)End If%><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>无标题文档</title></head><body><form id="form1" name="form1" method="POST" action="<%=MM_LoginAction%>">  <table width="500" border="0" align="center">    <tr>      <td align="right">用户名:</td>      <td><input name="UserID" type="text" id="UserID" /></td>    </tr>    <tr>      <td align="right">密码:</td>      <td><input name="Password" type="password" id="Password" /></td>    </tr>    <tr>      <td align="right">　</td>      <td><input type="submit" name="Submit" value="提交" />      <input type="submit" name="Submit2" value="提交" /></td>    </tr>  </table></form></body></html><%Recordset1.Close()Set Recordset1 = Nothing%>