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

📄 zc.jsp

📁 servlet做的教职工管理系统
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%@ page pageEncoding="GB2312"%>
<% request.setCharacterEncoding("gb2312"); %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新职工注册</title>
<style type="text/css">
<!--
.style3 {
	font-size: 12px;
	color: #FFFFFF;
}
.style4 {font-size: 12px}
.style21 {	color: #999999;
	font-size: 12px;
}
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
}
-->
</style>
<script>
	function getUrl()
	{
		var values ='http://localhost:8080/shopping/'+document.getElementById('ddlList').value+'.gif';
		document.getElementById('Img2').src=values;
	}
	function checkspace(checkstr)
	{
		var str = '';
		for(i = 0; i < checkstr.length; i++) {
		str = str + ' ';
		}
		return (str == checkstr);
	}
	function check()
	{
		if(checkspace(document.form1.user.value)) {
			document.form1.user.focus();
			alert("请填写用户名!");
			return false;
		}
		if(checkspace(document.form1.password1.value)) {
			document.form1.password1.focus();
			alert("请填写密码!");
			return false;
		}
		if(checkspace(document.form1.password2.value)) {
			document.form1.password2.focus();
			alert("请填写确认密码!");
			return false;
		}
		if(checkspace(document.form1.tname.value)) {
			document.form1.tname.focus();
			alert("请填写真实姓名!");
			return false;
		}
		if(checkspace(document.form1.uclass.value)) {
			document.form1.uclass.focus();
			alert("请填写您入住年份!");
			return false;
		}
		if(checkspace(document.form1.num.value)) {
			document.form1.num.focus();
			alert("请填写您的工号!");
			return false;
		}
		if(document.form1.password1.value!=document.form1.password2.value)
		{
			document.form1.password1.focus();
			alert("两次密码输入不一致!");
			return false;
		}
		if(document.form1.password1.value.length<6)
		{
			document.form1.password1.focus();
			alert("密码和确认密码至少为6位!");
			return false;
		}
		if(document.form1.num.value.length<8)
		{
			document.form1.num.focus();
			alert("工号为8位数字!");
			return false;
		}
	}
</script>
</head>

<body>
<table width="103%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="1031" height="52" colspan="10" background="image/top_bg.gif"><table width="466" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="269">&nbsp;</td>
          <td width="167">&nbsp; </td>
          <td width="30"></td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td height="25" background="image/menu_bg.gif">&nbsp; <span class="style3">新用户注册</span></td>
  </tr>
  <tr>
    <td><form name="form1" method="post" action="servlet/NewUser" onSubmit="return check();">
      <table width="90%"  border="0" align="center">
        <tr>
          <td height="30" colspan="2">&nbsp; <span class="style4">说明:<font color="#E85E03">(*)</font> 为必须填写项</span></td>
        </tr>
        <tr>
          <td width="200" height="35" align="right" valign="middle" bgcolor="#F2F5F7"><span class="style4">用户名</span><span class="style4"><font color="#E85E03">(*)</font></span>:</td>
          <td height="35"><input name="user" type="text" id="user" style="width:180px; height:17px ">
              <span class="style21">2-20个字符</span></td>
        </tr>
        <tr>
          <td width="200" height="35" align="right" valign="middle" bgcolor="#F2F5F7"><span class="style4">密 码<font color="#E85E03">(*)</font></span>:</td>
          <td height="35"><input name="password1" type="password" id="password1" style="width:180px; height:17px ">
              <span class="style21">安全提醒:最少6个字符</span></td>
        </tr>
        <tr>
          <td width="200" height="35" align="right" valign="middle" bgcolor="#F2F5F7"><span class="style4">确认密码<font color="#E85E03">(*)</font></span>:</td>
          <td height="35"><input name="password2" type="password" id="password2" style="width:180px; height="17px"">
              <span class="style21">确认你上面输入的密码</span></td>
        </tr>
        <tr>
          <td height="35" align="right" valign="middle" bgcolor="#F2F5F7"><span class="style4">真实姓名<font color="#E85E03">(*)</font></span>:</td>
          <td height="35"><input name="name" type="text" id="name" style="width:180px; height="17px"">
            <span class="style21">您的真实姓名</span>           </td>
        </tr>
        <tr>
          <td width="200" height="35" align="right" valign="middle" bgcolor="#F2F5F7"><span class="style4">所在院系<font color="#E85E03"></font><font color="#E85E03">(*)</font></span>:</td>
          <td height="35"><select name="college" id="college">
            <option value="化学工程学院">化学工程学院</option>
            <option value="机械工程学院">机械工程学院</option>
            <option value="信息工程学院">信息工程学院</option>
            <option value="材料科学与工程学院">材料科学与工程学院</option>
            <option value="应用化学学院">应用化学学院</option>
            <option value="环境与生物生物工程学院">环境与生物生物工程学院</option>
            <option value="计算机科学与技术学院">计算机科学与技术学院</option>
            <option value="经济管理学院">经济管理学院</option>
            <option value="数理系">数理系</option>
            <option value="外语系">外语系</option>
            <option value="社会科学系">社会科学系</option>
            <option value="体育系">体育系</option>
            <option value="科亚学院">科亚学院</option>
            <option value="国际教育学院">国际教育学院</option>
            <option value="成人教育学院">成人教育学院</option>
          </select>
            <span class="style21"> 请您正确选择所在院系</span></td>
        </tr>
        <tr>
          <td width="200" height="35" align="right" valign="middle" bgcolor="#F2F5F7"><span class="style4">入职年份<font color="#E85E03">(*)</font></span>:</td>
          <td height="35">            <input name="rzsj" type="text" id="rzsj">
            <span class="style21"> 请填写您的入住年份</span></td>
        </tr>
        
        <tr>
          <td width="200" height="35" align="right" valign="middle" bgcolor="#F2F5F7"><span class="style4">工 号<font color="#E85E03">(*)</font></span>:</td>
          <td height="35"><input name="gh" type="text" id="gh" onkeyup="value=value.replace(/[^\d]/g,'')     " maxlength="8"onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))">
            <span class="style21"> 8位数字</span></td>
        </tr>
        <tr>
          <td width="200" height="35" align="right" valign="middle" bgcolor="#F2F5F7"><span class="style4">性 别<font color="#E85E03">(*)</font></span>:</td>
          <td height="35"><select name="sex" id="sex" style="WIDTH: 50px" onchange="getUrl()">
            <option value="男">男</option>
            <option value="女">女</option>
          </select></td>
        </tr>
        <tr align="center">
          <td height="35" colspan="2" valign="middle"><input type="submit" name="Submit" value="确定注册">
&nbsp;
<input type="reset" name="Submit" value="重新填写"></td>
        </tr>
      </table>
    </form></td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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