登录页面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"  οnclick="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

%>

结果去无法跳转。