UserAdd.jsp
上传用户:jhoneliu
上传日期:2022-07-31
资源大小:950k
文件大小:2k
- <%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
- <!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">
- <link href="css/mycss.css" rel="stylesheet" type="text/css">
- </head>
- <body>
- <%
- if(session.getAttribute("userid")== null || session.getAttribute("userid").equals(""))
- {
- response.sendRedirect("index.jsp");
- }
- %>
- <jsp:include flush="true" page="head.jsp"/><br /><br />
- <form name="form1" method="post" action="userSave.jsp" onSubmit="return check();">
- <br><br><br><br>
- <p align="center"><font size="4" color="red"><b>新增操作员</b></font></p>
- <table width="400" border="1" align="center" cellpadding="3" cellspacing="1">
- <tr>
- <td width="148"><div align="right">操作员名称:</div></td>
- <td width="231"><input name="userID" type="text" id="userID" size="20" maxlength="20"></td>
- </tr>
- <tr>
- <td><div align="right">登录密码: </div></td>
- <td><input name="pwd" type="password" id="pwd" size="20" maxlength="20"></td>
- </tr>
- <tr>
- <td><div align="right">校验密码:</div></td>
- <td><input name="confirmPwd" type="password" id="confirmPwd" size="20" maxlength="20"></td>
- </tr>
- </table>
- <p align="center">
- <input type="submit" name="Submit" value=" 保 存 ">
- </p>
- </form>
- <br><br><br>
- <jsp:include flush="true" page="bottom.jsp"/>
- </body>
- </html>
- <script language="javascript">
- function check()
- {
- if(form1.userID.value==""){
- alert("请输入用户名");
- form1.userID.focus();
- return false;
- }
- if(form1.pwd.value==""){
- alert("请输入密码,密码不允许为空");
- form1.pwd.focus();
- return false;
- }if(form1.pwd.value !=form1.confirmPwd.value){
- alert("登录密码与校验密码不符");
- form1.confirmPwd.focus();
- return false;
- }
- return true;
- }
- </script>