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

📄 register.asp

📁 党的知识考试
💻 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.pwd.value!=document.form1.pwd2.value)
       
        {
             alert("对不起,二次输入不一样!");
			 document.form1.pwd.focus();
             return false;
         }
   
if (document.form1.classesn.value=="")
{alert("请输入班级名称!");
document.form1.classesn.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 学号='"&trim(request("number"))&"'"
set rsfind=conn.execute(sqlfind)
if not rsfind.eof then
%>
<script language=javascript>
alert("已有此学员,请重新录入!");

</script>
<%else
sqlin="insert into student (姓名,密码,性别,班级名称,班号,学号) values('"&trim(request("student"))&"','"&trim(request("pwd"))&"','"&trim(request("sex"))&"','"&trim(request("classesn"))&"','"&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 4.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="top.htm"-->
<div align="center">


  <center>
  <p align=center > <font color=re????栯浴??s????8汰?sesn.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;
}

documed>==============学员注册===============</font></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">姓名</td>
                <td width="400"> <input type="text" name="student" size="20"></td>
              </tr>
              <tr> 
                <td width="100">性别</td>
                <td width="400"><select name="sex" size="1">
                    <option value="男">男</option>
                    <option value="女">女</option>
                  </select> </tr>
              <tr> 
                <td>密码</td>
                <td> <input type="password" name="pwd" size="20"></td>
              </tr>
              <tr> 
                <td>密码确认</td>
                <td><input type="password" name="pwd2" size="20"></td>
              </tr>
              <tr> 
                <td>班级名称</td>
                <td> <input type="text" name="classesn" size="20"></td>
              </tr>
              <tr> 
			   
                <td>班号</td>
                <td> <input type="text" name="classes" size="20"></td>
              </tr>
                <td>学号</td>
                <td> <input type="text" name="number" size="20"></td>
              </tr>
              <tr> 
                <td colspan="2" align="center"> <input type="button" value="提交" name="B1" onclick="check()"> 
                  <input type="reset" value="重置" name="B2"></td>
              </tr>
            </table>
          </form> 
    </td> 
  </tr> 
</table> 
  </center> 
</div> 
<!--#include file="adv.htm"--> 
</body> 
 
</html>

⌨️ 快捷键说明

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