当前位置:首页 > 提供基于web的网上考试系统的设计与实现 - 毕业论文
第五章 在线考试系统的实现
if Pwd<>Pwd1 then
errstr=errstr&\两次密码不一致\else
if isnull(Address) then errstr=errstr&\请填写地址\else
if not rs.eof then
errstr=errstr&\用户名已存在\rs.close set rs=nothing else
errstr=errstr&\注册成功 点此登陆\
2. 登陆界面代码(login.asp)
function check_login() {
errfound = false;
if (document.form1.UserName.value==\
{
if (!errfound) {
window.alert(\请输入登录名!\form1.UserName.focus();
errfound = true;
29
第五章 在线考试系统的实现
} }
if (document.form1.Pwd.value==\
{
if (!errfound) {
window.alert(\请输入口令!\form1.Pwd.focus();
errfound = true;
} }
return ! errfound;
}
response.write \点此进入\if trim(username)=\errstr=errstr&\用户名错误\else
set rs=server.createobject(\
sql=\rs.open sql,conn,1,3 if rs.eof then
errstr=errstr&\无此用户\rs.close set rs=nothing else
if rs(\errstr=errstr&\密码错误\rs.close set rs=nothing
30
第五章 在线考试系统的实现
else