麻烦高手看下这段代码到底哪里错了!!
<!--#include file="../config/conn.asp"--><%
dim rs,sql
sql="select admin,password from tbl_admin where admin='"&request.form("adminname")&"' and password='"&(request.form("adminpsw"))&"'"
rs.open sql,conn,1,1
if rs.eof or rs.bof then
response.write "<script language=JavaScript>" & chr(13) & "alert('用户名或密码错!');"&" </script>"
rs.close
set rs=nothing
set conn=nothing
response.end()
else
response.write "<script language=JavaScript>" & chr(13) & "alert('登陆成功!');"&"window.location.href = 'admin.asp'"&" </script>"
rs.close
set rs=nothing
set conn=nothing
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>网站后台管理</title>
<script LANGUAGE="javascript">
function checkspace(checkstr) {
var str = '';
for(i = 0; i < checkstr.length; i++) {
str = str + ' ';
}
return (str == checkstr);
}
function check()
{
if(checkspace(document.admininfo.adminname.value)) {
document.admininfo.adminname.focus();
alert("管理员不能为空!");
return false;
}
if(checkspace(document.admininfo.adminpsw.value)) {
document.admininfo.adminpsw.focus();
alert("密码不能为空!");
return false;
}
document.admininfo.submit();
}
</script>
</head>
<body>
<table width="681" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top:120px">
<tr>
<td width="353" height="259" align="center" valign="bottom" background="Images/login_1.gif"><table width="90%" border="0" cellspacing="3" cellpadding="0">
</table></td>
<td width="195" background="Images/login_2.gif"><table width="190" height="106" border="0" align="center" cellpadding="2" cellspacing="0">
<FORM name="admininfo" action="login.asp" method=post onSubmit="return check()">
<tr>
<td height="50" colspan="2" align="left"> </td>
</tr>
<tr>
<td width="60" height="30" align="left">登陆名称</td>
<td><input name="adminname" type="TEXT" style="background:url(Images/login_6.gif) repeat-x; border:solid 1px #27B3FE; height:20px; background-color:#FFFFFF" id="UserName"size="14"></td>
</tr>
<tr>
<td height="30" align="left">登陆密码</td>
<td><input name="adminpsw" type=password style="background:url(Images/login_6.gif) repeat-x; border:solid 1px #27B3FE; height:20px; background-color:#FFFFFF" id="Password" size="16"></td>
</tr>
<tr>
<td height="40" colspan="2" align="center"><img src="Images/tip.gif" width="16" height="16"> 请勿非法登陆!</td>
<tr>
<td colspan="2" align="center"><input type="submit" name="submit" style="background:url(Images/login_5.gif) no-repeat" value=" 登 陆 ">
<input type="reset" name="Submit" style="background:url(Images/login_5.gif) no-repeat" value=" 取 消 "></td>
<tr>
<td height="5" colspan="2"></td>
</form>
</table></td>
<td width="133" background="Images/login_3.gif"> </td>
</tr>
<tr>
<td height="161" colspan="3" background="Images/login_4.gif"></td>
</tr>
</table>
</body>
</html>
这是显示错误
Microsoft VBScript ԋАʱ?펳 '800a01a8'
ȱə?ԏ'
\admin\login.asp, line 5