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

📄 rigester.asp

📁 本系统分两个子功能: 一:学生事务 统计学生的入学
💻 ASP
字号:
<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>注册</title>
<%
dim conn,connstr
connstr="Driver={sql server};UID=sa;PWD=sa;database=zikao;server=BILLGATES"
set conn=server.createobject("ADODB.CONNECTION")
conn.open connstr
set rs1=Server.CreateObject("ADODB.Recordset")
set rs2=Server.CreateObject("ADODB.Recordset")

sql1="select * from department"
sql2="select * from specialty"
rs1.open sql1,conn,3
rs2.open sql2,conn,3
%>
<script language = "JavaScript">
	var onecount;
	onecount=0;
	subcat = new Array();
    <%
        CountLinkAction = 0
	    do while not rs2.eof 
	%>
	    subcat[<%=CountLinkAction%>] = new Array("<%= trim(rs2("specialtyname"))%>","<%= trim(rs2("departmentno"))%>");
		<%
		CountLinkAction = CountLinkAction + 1
		rs2.movenext
    loop
    rs2.close
    set rs2=nothing
    %>
	onecount=<%=CountLinkAction%>;

	function changelocation(locationid)
	{
	    document.form1.Profecial.length = 0; 
	    var locationid=locationid;
	    var i;
	    document.form1.Profecial.options[0] = new Option('选择专业','');
	    for (i=0;i < onecount; i++)
	        {
	            if (subcat[i][1] == locationid)
	            { 
	                document.form1.Profecial.options[document.form1.Profecial.length] = new Option(subcat[i][0], subcat[i][0]);
	            }        
	        }
	
	}    
</script>
</head>

<body>
<FORM id=form1 name=form1 action=rigpost.asp method=post>
<table border="1" width="621" height="356">
	<tr>
		<td height="44" width="611" colspan="2">
		<p align="center">学生注册登记</td>
	</tr>
	<tr>
		<td height="29" width="115">学号</td>
		<td height="29" width="490"><input type="text" name="Sno" size="20"></td>
	</tr>
	<tr>
		<td height="28" width="115">姓名</td>
		<td height="28" width="490"><input type="text" name="Sname" size="20"></td>
	</tr>
	<tr>
		<td height="30" width="115">性别</td>
		<td height="30" width="490">
				<select size="1" name="Sex">
				<option value="男">男</option>
				<option value="女">女</option>
				</select></td>
	</tr>
	<tr>
		<td height="26" width="115">年龄</td>
		<td height="26" width="490"><input name="Age" type="text" id="Age" size="20"></td>
	</tr>
	<tr>
		<td height="32" width="115">系别</td> 
		<td height="32" width="490"><select name="Department" size="1" onChange="changelocation(document.form1.Department.options[document.form1.Department.selectedIndex].value)" >
		<% 
		  rs1.MoveFirst()
		  while not rs1.eof
		  response.write "<option value="&rs1(0)&">"&rs1(1)&"</option>"
		  rs1.MoveNext()
          wend	
         rs1.close
		  set rs1=nothing
         %>

		</select></td>
	</tr>
	<tr>
		<td height="36" width="115">专业</td>
		<td height="36" width="490">

		<select size="1" name="Profecial">
		
		</select></td>
	</tr>
	<tr>
		<td height="23" width="115">籍贯</td>
		<td height="23" width="490"><input type="text" name="Home" size="20"></td>
	</tr>
	<tr>
		<td height="22" width="115">民族</td>
		<td height="22" width="490"><input type="text" name="Nation" size="20"></td>
	</tr>
	<tr>
		<td height="22" width="115">身份证</td>
		<td height="22" width="490"><input type="text" name="IDcard" size="20"></td>
	</tr>
	<tr>
		<td height="23" width="115"><font size="2">E_Mail</font></td>
		<td height="23" width="490"><input type="text" name="Emial" size="20"></td>
	</tr>
	<tr>
		<td height="21" width="115">电话</td>
		<td height="21" width="490"><input type="text" name="Telno" size="20"></td>
	</tr>
	<tr>
		<td height="20" width="115">住址</td>
		<td height="20" width="490"><input type="text" name="Address" size="20"></td>
	</tr>
	<tr>
		<td height="25" width="115">是否缴费</td>
		<td height="25" width="490"><select size="1" name="Free">
		<option value="是">是</option>
		<option value="否">否</option>
		</select></td>
	</tr>
	<tr>
		<td height="60" width="611" colspan="2">
          <div align="center">
            <input type="submit" value="提交" name="B3">
			
            <input type="reset" value="重置" name="B5">
        </div></td>
	</tr>
</table>
</FORM>
</body>

</html>

⌨️ 快捷键说明

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