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

📄 addormodifyapplicantinfo.jsp

📁 bs_网上报名系统每个例子文件夹都附有数据库表、程序源文件和一个war包(或者jar包)。如果是cs结构的
💻 JSP
字号:
<%@ page contentType="text/html; charset=GBK" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<html>
<head>

<title>添加(修改)注册信息</title>
<script type="text/javascript">
  function DoDiff()
  {
    var ac = enrollmentForm.event.value;
      if (ac == 'modify')
        enrollmentForm.event.value = 'savemodify';
      if (ac == 'new')
       enrollmentForm.event.value = 'savenew';
      var sn = document.all['wbApplicantInfo.idCard'].value;
      var name = document.all['wbApplicantInfo.name'].value;
      var which  = document.getElementById("wbApplicantInfo.sex").selectedIndex;
      var pw = document.all['wbApplicantInfo.password'].value;
      var pw2 = document.all['verifypassword'].value;
      var tel = document.getElementById("wbApplicantInfo.telephone").value;
      if(sn == null || sn == "")
      {
        alert("身份证号不能为空!");
        return;
      }
      if (name == null ||name == "")
      {
        alert("姓名不能为空!");
        return;
      }
      if (pw == null || pw == '')
      {
        alert("密码不能为空");
        return;
      }
      if (pw != pw2)
      {
        alert("两次输入的密码不一致!");
        ocument.all['wbApplicantInfo.password'].focus();
        return ;
      }
      if (tel == null || tel == "")
      {
        alert("请输入联系方式!");
        return;
      }
      if (which == 0)
        document.getElementById("wbApplicantInfo.sex").value = "男";
      else
        document.getElementById("wbApplicantInfo.sex").value = "女";

    document.enrollmentForm.submit();
  }
  function returnToHomePage()
  {
    window.location = "./chooseOperation.jsp";
  }
</script>
</head>
<body bgcolor="#c0c0c0">
 <html:form action="/enrollmentAction">
   <html:hidden property="event"/>
   <input type="hidden" name="idCard" value='<bean:write property="wbApplicantInfo.idCard" name="enrollmentForm"/>'/>
   <table width="80%" border="0" cellspacing="0" cellpadding="1" >
     <tr><td align="right">身份证号</td>
       <td><html:text property="wbApplicantInfo.idCard" ></html:text></td>
     </tr>
     <tr><td align="right">姓名</td>
       <td><html:text property="wbApplicantInfo.name"></html:text></td>
     </tr>
     <tr><td align="right">密码</td>
       <td><html:password property="wbApplicantInfo.password"></html:password></td>
     </tr>
     <tr><td align="right">确认密码</td>
       <td><input type="password" name="verifypassword" value=""/></td>
     </tr>
     <tr><td align="right">性别</td>
       <td><html:select property="wbApplicantInfo.sex">
         <html:option value="男">男</html:option>
         <html:option value="女">女</html:option>
       </html:select>
      </td>
     </tr>
     <tr><td align="right">联系电话</td>
       <td><html:text property="wbApplicantInfo.telephone"></html:text></td>
     </tr>
      <tr><td align="right">备注</td>
       <td><html:textarea property="wbApplicantInfo.note"></html:textarea></td>
     </tr>
     <tr><td>&nbsp;</td>
       <td><input type="button" value="保 存" class="choosebutton" onclick="DoDiff()"/>
         <input type="reset" name="reset" value="取 消"/>
         <input type="button"  value="回首页" class="choosebutton" onclick="returnToHomePage();"/>
       </td>
     </tr>
   </table>
 </html:form>
</body>
</html>

⌨️ 快捷键说明

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