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

📄 traincertificateadd.jsp

📁 J2ee开发的 人事管理系统 使用oracle数据库 myeclips平台开发
💻 JSP
字号:
<%@ page language="java" import="java.util.*" pageEncoding="gb2312"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<SCRIPT language=javascript src="calendar.js"></SCRIPT>
<script type="text/javascript" src="prototype.js"></script>
<link rel="stylesheet"  type="text/css" href="../../css/css.css">
<head>
<%--<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
--%><title>查询更改员工证书记录</title>

</head>

<script>
function validatePersonID()
{
	var re=/^\d{8}$/;
	
	var personID = document.add.userPersonID.value;
	
	if(!personID.match(re))
	{
		alert("员工ID格式非法,请重新输入!");
		return false;
	}
	var url = "TR_CertRecordServlet";
	var pars = "opFlag=ajax&personID=" + personID;

	var myAjax = new Ajax.Request(
	url,
	{
		method:'POST',
		parameters:pars,
		onComplete:showResponse
	}
	);	
}

function showResponse(xRequest)
{
	var responseFlag = xRequest.responseText;
	if(responseFlag == 1){
		document.add.validateFlag.value = "true";
		return true;
	}
	else{
		document.add.validateFlag.value = "false";
		alert("员工ID不存在,请查证后确认输入!");
		return false;
	}
}

 function Check()
 {
 	  var vFlag = document.add.validateFlag.value;
      if( vFlag == "false" || document.add.username.value==""
       ||document.add.userID.value=="" ||document.add.CrClass.value==""
       ||document.add.CrID.value=="" ||document.add.CrDate.value=="")
      {
          window.alert("输入资料不完整!\n 请输入完整!"); 
          return false; 
      }
      document.add.submit();
}

<!-- 页面返回 -->
function GoBack()
{
   history.back();
}
</script>

<body>
<form name="add" method="post" action="TR_CertRecordServlet?opFlag=Add">
<input type="hidden" name="validateFlag" value="false">
<h1 align="center">添加员工证书记录</h1>
<table width="70%" height="225" border="0" cellspacing="0" align="center" class="toBeSetBgColor">
  <tr>
    <th width="22%" height="40" align="right" scope="row"> 学员姓名:</th>
    <td width="78%">
      <input name="username" type="text">
    </td>
  </tr>
  <tr>
    <th width="22%" height="40" align="right" scope="row"> 学员ID:</th>
    <td width="78%">
      <input name="userPersonID" type="text" onBlur="return validatePersonID()">
    </td>
  </tr>
  
  <tr>
    <th height="40" align="right" scope="row"> 证书名称: </th>
    <td>
      <select name="CrName">
        <option selected">~证书名称~</option>
        <option value="0">java工程师</option>
        <option value="1">c#工程师</option>
        <option value="2">.net工程师</option>
        <option value="3">体系架构师</option>
        <option value="4">网络工程师</option>
        <option value="5">数据库工程师</option>
      </select>
    </td>
  </tr>
  <tr>
    <th height="40" align="right" scope="row">证书类别:</th>
    <td>
      <input name="CrClass" type="text" >
    </td>
  </tr>
  
  <tr>
    <th height="40" align="right" scope="row">证书号:</th>
    <td>
      <input name="CrNumber" type="text" >
    </td>
  </tr>
    
  <tr>
    <th height="40" align="right" scope="row">证书日期:</th>
    <td><input name="CrDate" type="text"  readonly="yes">
        <a title=选择日期 href="javascript:fPopCalendar(document.all.img1,document.add.CrDate,250);"  style="text-decoration:none"><img id=img1 src="img_date.gif" width="25" align=absMiddle border=0 height="22"></a></td>
  </tr>
  <tr>
    <th height="40" align="left" scope="row">&nbsp;</th> 
    <td ><input  type="submit" name="submit" value="提交" onClick="return Check()" style="width: 50px; height: 25px"> <input  type = "reset" name = "reset" value = "重置" style="width: 50px; height: 25px"> <input  type="button"  value="返回" style="width: 50px; height: 25px" onclick="return GoBack()">
    </td>
  </tr>
</table>
<p align="center">&nbsp; </p>
</form>
</body>
</html>

⌨️ 快捷键说明

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