溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

asp登陸頁面的跳轉功能

發布時間:2020-08-01 10:28:56 來源:網絡 閱讀:689 作者:王志臨 欄目:編程語言

登錄頁面login.html

<form id="form1" name="form1" method="post" action="login.asp">
      <table width="400" height="60" border="0" bgcolor="#99CCFF">
        <tr>
          <td bgcolor="#99CCFF"><div align="right">用戶名:</div></td>
          <th width="198" scope="col"><div align="left">
            <input name="name" type="text" id="name" />
          </div></th>
        </tr>
        <tr>
          <td><div align="right">密碼:</div></td>
          <td><div align="left">
            <input name="pwd" type="password" id="pwd" />
          </div></td>
        </tr>
      </table>
        <p align="center">
          <input name="Submit" type="submit" value="登錄" />
          &nbsp;&nbsp;
          <input name="Submit2" type="submit"  onclick="MM_goToURL('parent','regist.html');return document.MM_returnValue" value="注冊" />
        </p>
    </form>

檢查頁面:login.asp

<%
name1=Trim(request("name"))
pwd=Trim(request("pwd"))
sql="select * from [users] where userID='"&name1&"' and mm='"&pwd&"'"
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,3,2
if rs.recordcount<1 then
%>
<script language="vbscript">
alert("用戶名或密碼錯誤!")
history.back
</script>
<%  else

session("userid")=name1  %>
<script language=javascript>alert('歡迎登陸')</script>
<script language=javascript>window.location.href='shareinfo.asp'</script>
<%

end if

%>

結果去無法跳轉。

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

亚洲午夜精品一区二区_中文无码日韩欧免_久久香蕉精品视频_欧美主播一区二区三区美女