<body style='background-color: #f2f2f2; font-family: Arial, sans-serif;'>
   <form action='updateAction.jsp' method='post' name='aaa'>
   <div style='width: 400px; margin: 50px auto; background-color: #fff; padding: 20px; border-radius: 10px; box-shadow: 0px 0px 10px rgba(0,0,0,0.2);'>
   <h2 style='text-align: center; color: #333;'>修改密码</h2>
   <hr style='border: none; border-top: 1px solid #ddd; margin: 20px 0;'>
      <div style='text-align: center;'>
         <label style='font-weight: bold;'>用户名:</label>
         <span><%=request.getParameter('name')%></span>
      </div>
      <br>
      <div style='text-align: center;'>
         <label style='font-weight: bold;'>原密码:</label>
         <span>******</span>
      </div>
      <br>
      <div style='text-align: center;'>
         <label style='font-weight: bold;'>新密码:</label>
         <input type='password' name='pwd1' style='padding: 5px; border-radius: 5px; border: 1px solid #ccc;'>
      </div>
      <br>
      <div style='text-align: center;'>
         <label style='font-weight: bold;'>确认密码:</label>
         <input type='password' name='pwd2' style='padding: 5px; border-radius: 5px; border: 1px solid #ccc;'>
      </div>
      <br>
      <div style='text-align: center;'>
         <input type='button' value='确定'  onclick='check();' style='padding: 10px 20px; border-radius: 5px; background-color: #337ab7; color: #fff; border: none; cursor: pointer;'>
      </div>
   </div>
   </form>
<script>
  // 合法性检验
   function check()
   { var c_pw1=document.aaa.pwd1.value;
     var c_pw2=document.aaa.pwd2.value;
     if(c_pw1!=c_pw2)
     {alert('两次密码不一致,重新输入'); }
     else
     document.aaa.submit(); }
</script>
</body>
安全修改密码 - 保护您的帐户安全

原文地址: https://www.cveoy.top/t/topic/jngN 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录