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

📄 modify.jsp

📁  一个用JSP写的基于了B/S的图书馆管理系统
💻 JSP
字号:
<%@page contentType="text/html; charset=GB2312"%>
<%@page session="true"%>
<jsp:useBean id="update" scope="page" class="web.ModifyMe"></jsp:useBean>
<%
  String UserID = (String) session.getAttribute("UserID");
  if (UserID == null || UserID.equals("")) {
    response.sendRedirect("logon.jsp?message=nologon");
  }
%>
<%
  if (request.getParameter("Password") != null) {
    String Email = request.getParameter("Email");
    String Address = request.getParameter("Address");
    String Phone = request.getParameter("Phone");
    String Password = request.getParameter("Password");
    update.setEmail(Email);
    update.setAddress(Address);
    update.setPhone(Phone);
    update.setPassword(Password);
    update.setUserID(UserID);
    //System.out.println("test---b");
    if (update.Update()) {
      //System.out.println("test --a");
      response.sendRedirect("main.jsp");
    }
  }
%>
<html>
  <link rel="stylesheet" href="style.css" type="text/css">
  <head>
    <title>修改信息</title>
    <style type="">a{TEXT-DECORATION:none}</style>
    <style type="text/css">
      <!--
        .style1 { border-color: #009900 }
      -->
    </style>
<script language="javascript" type="">
  function checkform(){
    if(document.form1.Email.value==""){
      alert("Email不能为空哦!");
      document.form1.Email.focus();
      return false;
    }
    if(document.form1.Address.value==""){
      alert("地址不能为空哦!");
      document.form1.Address.focus();
      return false;
    }
    if(document.form1.Phone.value==""){
      alert("电话不能为空哦!");
      document.form1.Phone.focus();
      return false;
    }
    if(document.form1.Password.value==""){
      alert("密码不能为空哦!");
      document.form1.Password.focus();
      return false;
    }
    if(document.form1.Password1.value != document.form1.Password.value){
      alert("确认密码不相符!");
      doucument.form1.Password1.focus();
      return false;
    }
    return true;
  }<a></a>
</script>
  </head>
  <body bgcolor="#ffffff">
    <jsp:include flush="true" page="head_.jsp"></jsp:include>
    <hr width="62%"/>
    <p align="center">
      <font color="0000ff" size="+3">修改个人信息</font>
    </p>
    <form name="form1" action="modify.jsp" method="POST">
      <table align="center" width="60%" cellpadding="1" cellspacing="0" border="1">
        <tr align="right">
          <td align="left" width="50%">Email:</td>
          <td align="left">
            <input type="text" name="Email"/>
          </td>
        </tr>
        <tr>
          <td align="left" width="50%">住址:</td>
          <td>
            <input type="text" name="Address"/>
          </td>
        </tr>
        <tr>
          <td align="left" width="50%">电话:</td>
          <td>
            <input type="text" name="Phone"/>
          </td>
        </tr>
        <tr>
          <td align="left" width="50%">密码:</td>
          <td>
            <input type="password" name="Password"/>
          </td>
        </tr>
        <tr>
          <td align="left" width="50%">确认密码:</td>
          <td>
            <input type="password" name="Password1"/>
          </td>
        </tr>
        <tr>
          <td align="center">
            <input type="submit" name="submit" value="确 认" onclick="return(checkform());"/>
          </td>
          <td>
            <input type="reset" name="reset" value="重 设"/>
          </td>
        </tr>
      </table>
    </form>
    <hr width="62%"/>
    <div align="center">
      <table align="center">
        <tr align="center">
          <td align="center">
            <a href="../index.jsp">回到主页</a>
          </td>
          <td align="center">|</td>
          <td align="center">
            <a href="../search.jsp">目录查询</a>
          </td>
          <td align="center">|</td>
          <td align="center">
            <a href="../logon.jsp">读者登录</a>
          </td>
          <td align="center">|</td>
          <td align="center">
            <a href="../newbook.jsp">新书通报</a>
          </td>
          <td align="center">|</td>
          <td align="center">
            <a href="../subscribe.jsp">订购需求</a>
          </td>
          <td align="center">|</td>
          <td align="center">
            <a href="../liuyan.jsp">发表留言</a>
          </td>
          <td align="center">|</td>
          <td align="center">
            <a href="../help.jsp">查询帮助</a>
          </td>
        </tr>
      </table>
    </div>
<p align="center">版权所有&copy;2005-2008 By Miracle<br>Email:djbbuaa@163.com </p>
  </body>
</html>

⌨️ 快捷键说明

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