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

📄 useraddform.jsp

📁 一个很有用的电子刊物发布系统
💻 JSP
字号:
<%@ page language="java" contentType="text/html;charset=gb2312" %>
<%@ page import="java.sql.*" %>
<HTML>
<HEAD>
	<title>刊物文章管理系统</title>
	<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<SCRIPT language=javascript>
function checkform()
{
    
      if (FORM1.txtusername.value=="") {
                alert( "请填写用户名." );
                FORM1.txtusername.focus();
                return false;
      }
      if (FORM1.txtuserPassword.value=="") {
                alert( "请填写密码." );
                FORM1.txtuserPassword.focus();
                return false;
      }
	   if (FORM1.txtuserPassword1.value=="") {
                alert( "请填写确认密码." );
                FORM1.txtuserPassword1.focus();
                return false;
      }
	   if (FORM1.txtuserPassword.value != FORM1.txtuserPassword1.value) {
                alert( "两次密码不一致." );
                FORM1.txtuserPassword.focus();
                return false;
      }

      str1=FORM1.txtemail.value;
      key=str1.match(/\@/);
      if (key==null) {
           alert( "Email填写错误." );
           FORM1.txtemail.focus();
           return false;
      }  
	var UnCheck=true;
   for (i=0;i<document.FORM1.myfields.length;i++)
   {
     if (document.FORM1.myfields[i].checked)
      {UnCheck=false;break;}
   }
     if (UnCheck)
      {
        alert("请选择研究主题.");
        document.FORM1.myfields[0].focus();
        return false;
      }
      return true ;
}

</SCRIPT>


</HEAD>
<BODY>
<jsp:useBean id="dbconn" scope="application" class="com.am.OpenDB"/>
<DIV align=center>
        <form action=userAddSave.jsp method=post name=FORM1 onsubmit="checkform()" >

  <table width="60%" border="0" cellpadding="0" cellspacing="0">          
   <tr>
		<td width=50% align=right bgcolor="#DFDFDF"><font
		face=Arial,Helvetica color=navy
		size=3 >用户名:</font></td>
		<td><input type="text" name="txtusername"  size="30"> <font color="red">*</font>  </td>
	</tr>
	<tr>
		<td width=50% align=right bgcolor="#DFDFDF">
		<font face=Arial,Helvetica color=navy size=3>密码:</font></td>
		<td >
		<input size=30 name="txtuserPassword" type="password"><font color="red">*</font></td>
		</tr>
		<tr>
		<td width=50% align=right bgcolor="#DFDFDF">
		<font face=Arial,Helvetica color=navy size=3>确认密码:</font>
		</td>
		<td>
		<input size=30 name="txtuserPassword1" type="password"><font color="red">*</font>
		</tr>
	<tr>
		<td width=50% align=right bgcolor="#DFDFDF">
		<font face=Arial,Helvetica color=navy
		size=3>姓名:</font></td>
		<td >
		<input size=30 name="txtname" type="text" ><font color="red">*</font>
		</td>
	</tr>     
	<tr>
		<td width=50% align=right bgcolor="#DFDFDF"><font face=Arial,Helvetica color=navy
		size=3 >所在公司:</font></td>
		<td>
		<input size=30 name="txtcompany" type="text">
		</td>
	</tr>
	<tr>
		<td width=50% align=right bgcolor="#DFDFDF"><font face=Arial,Helvetica color=navy
		size=3>所属部门:</font></td>
		<td >
		<input size=30 name="txtdepart" type="text">
		</td>
	</tr>

	<tr>
		<td width=50% align=right bgcolor="#DFDFDF">
		<font
		face=Arial,Helvetica color=navy size=3>Email:</font></td>
		<td >
		<input type=text size=30 name="txtemail"><font color="red">*</font>
		</td>
	</tr>        
	<tr>
		<td width=50% align=right bgcolor="#DFDFDF">
		<font
		face=Arial,Helvetica color=navy size=3 >研究主题:</font></td>
		<td>
		<%
					String strSqlworkgroups="";
					Statement stmtworkgroups=dbconn.getConnection().createStatement();
					strSqlworkgroups="select * from `workgroup` where tag=0 order by id";
					ResultSet rsworkgroups=stmtworkgroups.executeQuery(strSqlworkgroups);
					while(rsworkgroups.next())
					{
					%>
							  <input type="checkbox" name="txtmyfields" value=<%=rsworkgroups.getLong("ID") %>>
							  <%=rsworkgroups.getString("note")+' '+rsworkgroups.getString("fieldName")%>
							  <br> 
					<%
					}
					stmtworkgroups.close();
					rsworkgroups.close();
					%> 
		</td>
	</tr>
	<tr>
		<td width=50% align=right bgcolor="#DFDFDF">
		<font face=Arial,Helvetica color=navy size=3 >用户类型:</font>
		</td>
		<td>
		        <input type="radio" name="systemRole" value="1" checked>作者&nbsp;
				<input type="radio" name="systemRole" value="2">评审员

		</td>
	</tr>
	<tr>
		<td colspan="2">
		<font size="3" color="#0000FF">
		<center>带<font color="red">*</font>为必填项</center>
		</font>
		</td>
	</tr>
	<tr>

		<td align=center colspan=2>
		<input type=submit value="提交" name="btnSubmit">
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input type=reset value="重填" name="btnReset">
		</td>
	</tr>
    
  </table>
 </form>

</DIV>
</BODY></HTML>

⌨️ 快捷键说明

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