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

📄 changpwd.jsp

📁 图书馆管理系统 能满足 查询
💻 JSP
字号:
<%@ page language="java" pageEncoding="utf-8"%>
<%@page import="com.jxyd.vo.UserBean;"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<base target="_self">
<html>
	<head>
		<base href="<%=basePath%>">
		<title>修改密码</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<link href="<%=basePath%>/css/style.css" rel="stylesheet">
		<link href="<%=basePath%>/css/main.css" rel="stylesheet">
		<script type="text/javascript">
       function chanpwd(id){
       var xpwd=document.showform.xpwd.value;
       var npwd=document.showform.npwd.value;
       if(xpwd==""||npwd==""){
         alert('请输入新密码!');
         document.showform.xpwd.focus();
         return false;
         }
       if(xpwd!=npwd){
        alert('两次输入的密码不一样!');
        document.showform.xpwd.value="";
        document.showform.npwd.value="";
        document.showform.xpwd.focus();
        return false;
        }else if(xpwd==npwd){
         document.showform.action="user.do?method=ChangPwd&id="+id;
         document.showform.submit();
         window.close();
         return true;
         }
         }
</script>
	</head>

	<body>
		<form action="" name="showform" method="post">
					<%
						UserBean ub = (UserBean) request.getAttribute("ub");
						if (ub != null) {
					%>
					<table width="300" border="1" class="table" >
						<tr>
							<td width="66">
								姓名
							</td>
							<td width="177">
								<label>
									<input type="text" name="name" value="<%=ub.getName()%>"
										size="20" />
								</label>
							</td>
						</tr>
						<tr>
							<td>
								原密码:
							</td>
							<td>
								<label>
									<input type="text" name="ypwd" value="<%=ub.getPassword()%>"
										size="20" />
								</label>
							</td>
						</tr>
						<tr>
							<td>
								新密码:
							</td>
							<td>
								<label>
									<input type="password" name="xpwd" size="22" />
								</label>
							</td>
						</tr>
						<tr>
							<td>
								重新输入:
							</td>
							<td>
								<label>
									<input type="password" name="npwd" size="22" />
								</label>
							</td>
						</tr>
						<tr>
							<td colspan="2">
								<input type="button" value="确定"
									onclick="chanpwd(<%=ub.getId()%>)">
								<input type="reset" value="取消" onclick="window.close();">
							</td>
						</tr>
					</table>
					<!--end RIGHT-->
					<%
						}
					%>
					<logic:present name="error"><%=request.getAttribute("error")%></logic:present>
		</form>
	</body>
</html>

⌨️ 快捷键说明

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