[求助]求一个用VBSCRIPT编写的留言本
求一个用VBSCRIPT编写的留言本,想仔细研究一下。要有注册,登录验证等。下载了好多,都有JS和DHMTL,不太明白,请高手赐教,谢谢!
<!--#include file=\"conn.asp\"-->
<center>
<html>
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\" />
<title>后台登录-<%=ltname%></title>
<link href=\"css.css\" rel=\"stylesheet\" type=\"text/css\">
<script language=\"javascript\">
<!--
function check_Null(){
if (document.form1.user_name.value==\"\"){
alert(\"用户名不能为空\");
return false;
}
if (document.form1.password.value==\"\"){
alert(\"密码不能为空\");
return false;
}
return true;
}
//-->
</script>
<style type=\"text/css\">
<!--
body {
background-color: #F2F2F2;
}
-->
</style></head>
<body>
<h1><%=ltname%>后台登录</h1>
<form name=\"form1\" method=\"post\" action=\"\" onSubmit=\"javascript:return check_Null();\">
<table width=\"25%\" border=\"0\" cellpadding=\"5\" cellspacing=\"5\">
<tr>
<td nowrap>用户:</td>
<td><input name=\"user_name\" type=\"text\" maxlength=\"20\"></td>
</tr>
<tr>
<td nowrap>密码:</td>
<td><input name=\"password\" type=\"password\" maxlength=\"20\"></td>
</tr>
<tr>
<td colspan=\"2\" align=\"center\"><label>
<input type=\"submit\" name=\"Submit\" value=\"提交\">
</label>
<label>
<input type=\"reset\" name=\"Submit2\" value=\"重置\"></label></td>
</tr>
</table>
</form>
<%
dim user_name,password
user_name=th(request.form(\"user_name\"))
password=th(request.form(\"password\"))
if user_name<>\"\" and password<>\"\" then
sql=\"select * from admin where admin_name='\"&user_name&\"' and admin_pass='\"&password&\"'\"
set rs=db.execute(sql)
if not rs.bof and not rs.eof then
session(\"user_name\")=user_name
response.redirect\"index.asp\"
else
response.write\"<script language=javascript>alert('用户名或密码错误,请重新输入!');</script>\"
end if
end if
%>
</body>
</html>
</center>