📄 tesreg.jsp
字号:
<%@ page contentType="text/html; charset=gb2312"%>
<%@ page language="java" import="java.sql.*"%>
<jsp:useBean id="dep1" scope="page" class="exam.exam"/>
<%
String sql1="select * from departmen";
ResultSet rs1=dep1.executeQuery(sql1);
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<SCRIPT LANGUAGE="JavaScript">
<!--
function isNum(passedVal){
if(passedVal=="")
{
return false;
}
for(i=0;i<passedVal.length;i++){
if(passedVal.charAt(i)<"0") {//如果输入值小于0,则错误
return false;
}
if(passedVal.charAt(i)>"9") {//如果输入值不在0-9范围内,则错误
return false;
}
return true;
}
}
function isValid(){
var oq=document.form1.snum.value;
if(oq!=""){
if(oq.length!=11){
alert("准考证号的位数不对啊");
document.form1.snum.focus();
return false;
}
if(isNum(document.form1.snum.value)==false){
alert("准考证号你好象写错了吧");
document.form1.snum.focus();
return false;
}
}
else {alert("您什么也没写呢?"); document.form1.snum.focus();
return false;
}
if(form1.sname.value==""){
alert("忘写考生姓名了!");
document.form1.sname.focus();
return false;
}
if(form1.give.value==0){
alert("请填写系别!");
document.form1.give.focus();
return false;
}
var sno=document.form1.sno.value;
if(sno!=""){
if(isNum(document.form1.sno.value)==false){
alert("学号!!你好象写错了吧");
document.form1.sno.focus();
return false;
}
}
else {alert("学号没写呢?"); document.form1.sno.focus();
return false;
}
}
// -->
</SCRIPT>
<link href="_notes/aaa.css" rel="stylesheet" type="text/css">
</HEAD>
<BODY BGCOLOR=#0D85A6 BACKGROUND="images/bg.gif" >
<br>
<br>
<TABLE WIDTH=750 BORDER=0 CELLPADDING=0 CELLSPACING=0 align="center">
<TR>
<TD> <IMG SRC="images/spacer.gif" WIDTH=231 HEIGHT=1></TD>
<TD> <IMG SRC="images/spacer.gif" WIDTH=4 HEIGHT=1></TD>
<TD> <IMG SRC="images/spacer.gif" WIDTH=75 HEIGHT=1></TD>
<TD> <IMG SRC="images/spacer.gif" WIDTH=110 HEIGHT=1></TD>
<TD> <IMG SRC="images/spacer.gif" WIDTH=110 HEIGHT=1></TD>
<TD> <IMG SRC="images/spacer.gif" WIDTH=110 HEIGHT=1></TD>
<TD> <IMG SRC="images/spacer.gif" WIDTH=105 HEIGHT=1></TD>
<TD> <IMG SRC="images/spacer.gif" WIDTH=5 HEIGHT=1></TD>
</TR>
<TR>
<TD COLSPAN=4> <IMG SRC="images/temp_01.gif" WIDTH=420 HEIGHT=15></TD>
<TD COLSPAN=4> <IMG SRC="images/temp_02.jpg" WIDTH=330 HEIGHT=15></TD>
</TR>
<TR>
<TD COLSPAN=8> <IMG SRC="images/temp_03.jpg" WIDTH=750 HEIGHT=5></TD>
</TR>
<TR>
<TD>
<table width="231" border="0" cellspacing="0" cellpadding="0" height="226" background="images/left_top.jpg">
<tr>
<td width="231">
<div align="center">
<p> </p>
<p> </p>
<p> </p>
<p><font color="#2DFFFF" size="5"><strong>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="133" height="35">
<param name="movie" value="back1.swf">
<param name="quality" value="high">
<param name="BGCOLOR" value="#99CCCC">
<embed src="back1.swf" width="133" height="35" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" bgcolor="#99CCCC">
</embed>
</object> </strong></font></p>
<p><strong></strong></p>
</div>
</td>
</tr>
</table>
</TD>
<TD ROWSPAN=2> <IMG SRC="images/temp_05.jpg" WIDTH=4 HEIGHT=455></TD>
<TD COLSPAN=5 ROWSPAN=2>
<table width="510" border="0" cellspacing="0" cellpadding="0" height="455" background="images/main_bg.jpg">
<tr>
<td width="510">
<table width="510" border="0" cellspacing="0" cellpadding="0" height="455">
<tr>
<td width="510" height="78" background="images/main_bg.gif">
<div align="center"><img src="images/blank_banner.gif" width="468" height="60"></div>
</td>
</tr>
<tr>
<td background="images/main_bg.gif">
<div align="center">
<table width="227" height="26" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<div align="center" class="aaa"><font color="#66ccff">学生注册</font></div>
</td>
</tr>
</table>
<form name="form1" method="post" action="tesreg1.jsp" onSubmit="return isValid();">
<table width="308" height="202" border="1" cellpadding="0" cellspacing="1" bordercolor="#006666">
<tr>
<td width="103" background="images/bg.gif" class="bbb">
<div align="right" class="ccc"><font color="#66ccff">准考证号</font></div>
</td>
<td width="210" background="images/bg.gif">
<input type="text" name="snum">
</td>
</tr>
<tr>
<td width="103" height="27" background="images/bg.gif" class="bbb">
<div align="right" class="ccc"><font color="#66ccff">姓名</font></div>
</td>
<td background="images/bg.gif">
<input type="text" name="sname">
</td>
</tr>
<tr>
<td height="23" background="images/bg.gif" class="bbb">
<div align="right" class="ccc"><font color="#66ccff">性别</font></div>
</td>
<td background="images/bg.gif">
<table width="179" height="22" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="51">
<div align="right">
<input name="ssex" type="radio" value="1" checked>
</div>
</td>
<td width="37" class="ccc"><font color="#66ccff">男</font></td>
<td width="55">
<div align="right">
<input type="radio" name="ssex" value="2">
</div>
</td>
<td width="36" class="ccc"><font color="#66ccff">女</font></td>
</tr>
</table>
</td>
</tr>
<tr>
<td background="images/bg.gif" class="bbb">
<div align="right" class="ccc"><font color="#66ccff">学号</font></div>
</td>
<td background="images/bg.gif">
<input name="sno" type="text" size="2" maxlength="2">
</td>
</tr>
<tr>
<td background="images/bg.gif" class="bbb">
<div align="right" class="ccc"><font color="#66ccff">年级</font></div>
</td>
<td background="images/bg.gif">
<select name="grade">
<option value="98">98</option>
<option value="99">99</option>
<option value="00">00</option>
<option value="01">01</option>
<option value="02">02</option>
<option value="03">03</option>
<option value="04">04</option>
<option value="05">05</option>
<option value="06">06</option>
<option value="98">07</option>
<option value="99">08</option>
<option value="00">09</option>
<option value="01">10</option>
<option value="02">11</option>
<option value="03">12</option>
<option value="04">13</option>
<option value="05">14</option>
<option value="06">15</option>
</select>
</td>
</tr>
<tr>
<td background="images/bg.gif" class="bbb">
<div align="right" class="ccc"><font color="#66ccff">班级</font></div>
</td>
<td background="images/bg.gif">
<select name="sclass">
<option value="1" selected>1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
</select>
<span class="ccc"> <font color="#66ccff">班</font></span></td>
</tr>
<tr>
<td background="images/bg.gif" class="bbb">
<div align="right" class="ccc"><font color="#66ccff">所在系</font></div>
</td>
<td background="images/bg.gif">
<select name="give">
<option value="0" selected>--请选择部门名--</option>
<%
while(rs1.next())
{
int num=rs1.getInt("dep");
String depname=rs1.getString("depname");
%>
<option value="<%=num%>">--<%=depname%>--</option>
<%}%>
</select>
</td>
</tr>
</table>
<table width="212" height="37" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="bottom">
<div align="center">
<input type="submit" name="Submit" value="提交">
</div>
</td>
<td valign="bottom">
<div align="center">
<input type="reset" name="Submit2" value="重置">
</div>
</td>
</tr>
</table>
</form>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</TD>
<TD ROWSPAN=2> <IMG SRC="images/temp_07.jpg" WIDTH=5 HEIGHT=455></TD>
</TR>
<TR>
<TD>
<table width="231" border="0" cellspacing="0" cellpadding="0" height="229" background="images/left_bottom.jpg">
<tr>
<td width="231">
<div align="center">
<p><strong><font color="#FF0000" size="4"><a href="tesreg.jsp">考生注册</a></font></strong></p>
<p><strong><font color="#2DFFFF" size="5"><font color="#FF0000" size="4"><a href="tesmessage.htm">考生信息</a></font></font></strong></p>
<p class="aaa"> </p>
<p> </p>
</div>
</td>
</tr>
</table>
</TD>
</TR>
<TR>
<TD COLSPAN=8> <IMG SRC="images/temp_09.jpg" WIDTH=750 HEIGHT=5>
<img src="images/temp_10.jpg" width=749 height=20></TD>
</TR>
</TABLE>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -