jsp1.jsp
上传用户:jhoneliu
上传日期:2022-07-31
资源大小:950k
文件大小:1k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  5. </head>
  6. <body>
  7.   <%
  8. if(session.getAttribute("userid")== null || session.getAttribute("userid").equals(""))
  9. {
  10.   response.sendRedirect("index.jsp");
  11. }
  12. %>
  13. <jsp:include flush="true" page="head.jsp"/><br /><br /><br /><br />
  14. <form name="form1" method="post" action="DepAddSave.jsp" onSubmit="return check();">
  15.   <table width="500" height="104" border="1" align="center" cellpadding="3" cellspacing="1">
  16.     <caption>
  17.     新增部门资料
  18.     </caption>
  19.     <tr>
  20.       <td width="301" height="50" ><div align="right">部门名称:</div></td>
  21.       <td width="446"><input name="depName" type="text" id="depName" maxlength="20"></td>
  22.     </tr>
  23.     <tr>
  24.       <td colspan="2"><div align="center">
  25.         <input type="submit" name="Submit" value="  保  存   ">
  26.       </div></td>
  27.     </tr>
  28.   </table>
  29. </form>
  30. <jsp:include flush="true" page="bottom.jsp"/>
  31. </body>
  32. </html>
  33. <script language="javascript">
  34. function check()
  35. {
  36. if(form1.depName.value=="")
  37. {
  38. alert("请输入部门名称");
  39. form1.depName.focus();
  40. return false;
  41. }
  42. return true;
  43. }
  44. </script>