⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 register.asp

📁 利用ASP+SQL制作的在线考试系统
💻 ASP
字号:
<!--#include file="conn.asp"-->
<script language=javascript>
function check()
{
if (document.form1.student.value=="")
{alert("请输入学生姓名!");
document.form1.student.focus();
return false;
}
if (document.form1.pwd.value=="")
{alert("请输入密码!");
document.form1.pwd.focus();
return false;
}
if (document.form1.classes.value=="")
{alert("请输入班级!");
document.form1.classes.focus();
return false;
}

if (document.form1.number.value=="")
{alert("请输入学号!");
document.form1.number.focus();
return false;
}

document.form1.ctype.value="add";
document.form1.submit();

}
</script>

<% if trim(request("ctype"))="add" then
sqlfind="select * from student where studentnumber='"&trim(request("number"))&"'"
set rsfind=conn.execute(sqlfind)
if not rsfind.eof then
%>
<script language=javascript>
alert("已有此学员,请重新录入!");

</script>
<%else
sqlin="insert into student (studentname,studentpassword,sex,class,studentnumber) values('"&trim(request("student"))&"','"&trim(request("pwd"))&"','"&trim(request("sex"))&"','"&trim(request("classes"))&"','"&trim(request("number"))&"')"

set rs=conn.execute(sqlin)

%>
<script language=javascript>
alert("注册成功!");
window.navigate("login.asp");

</script>
<%end if 
end if %>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>网上考试系统</title>
<link rel="stylesheet" type="text/css" href="css.css">
</head>

<body topmargin="0" leftmargin="0">
<!--#include file="top2.htm"-->
<div align="center">


  <center>
  <p align=center > ==============学员注册===============</p>
 
<table border="1" cellpadding="4" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="760" height="100">
  <tr>
    <td align="center">
     <form name=form1 action="">
     <input type="hidden" name="ctype">
    <table border="1" cellpadding="4" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="500">
      <tr>
        <td width="100" align="right">姓名</td>
        <td width="200"> 
		<input type="text" name="student" size="20" style="height: 22; border-style: solid; border-width: 1px" class="line"></td>
        <td width="200"> (*必填)</td>
      </tr>
      <tr>
        <td width="100" align="right">性别</td>
        <td width="200">
		<select name="sex" size="1" style="border: 1px solid #000000" class="line">
        <option value="男">男</option>
        <option value="女">女</option>

</select>
      </tr>
        <td width="200"> </tr>
      <tr>
        <td align="right">密码</td>
        <td> 
		<input type="password" name="pwd" size="20" style="height: 22; border: 1px solid #000000" class="line"></td>
        <td> (密码长度小于等于6位)</td>
      </tr>
      <tr>
        <td align="right">班号</td>
        <td> 
		<input type="text" name="classes" size="20" style="height: 22; border: 1px solid #000000"></td>
        <td>  </td>
      </tr>
      <tr>
        <td align="right">学号</td>
        <td> 
		<input type="text" name="number" size="20" style="height: 22; border: 1px solid #000000"></td>
        <td> (*必填)</td>
      </tr>
      <tr>
        <td colspan="3" align="center">
      <input type="button" value="提交" name="B1" onclick="check()" style="height: 22; width: 60; border-style: solid; border-width: 1px; background-color: #FFFFFF" class="line"> 
		<input type="reset" value="重置" name="B2" style="width: 60; height: 22; border-style: solid; border-width: 1px; background-color: #FFFFFF"></td> 
      </tr> 
    </table></form> 
    </td> 
  </tr> 
</table> 
  </center> 
</div> 
</body> 
 
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -