溫馨提示×

溫馨提示×

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

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

asp登陸頁面的跳轉(zhuǎn)功能

發(fā)布時(shí)間:2020-08-01 10:28:56 來源:網(wǎng)絡(luò) 閱讀:643 作者:王志臨 欄目:編程語言

登錄頁面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("用戶名或密碼錯(cuò)誤!")
history.back
</script>
<%  else

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

end if

%>

結(jié)果去無法跳轉(zhuǎn)。

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI