<%@ page language="java" import="com.whptu.shopping.user.*" pageEncoding="GBK"%>
<%@ page import="java.util.*"%><%
//检查session,查看用户是否登陆
User u = (User)session.getAttribute("user");
if(u == null) {
response.sendRedirect("UserLogin.jsp");
return;
}
%><%
request.setCharacterEncoding("GBK");
String action = request.getParameter("action");
if(action != null && action.trim().equals("modify")) { String password = request.getParameter("password");
u.setPassword(password);
u.updatePassword();
out.println("更改成功!");
return;
} %><html>
<head>
<script type="text/javascript">
function check(){
var password1 = document.getElementById("password").value;
if(password1==null){
alert("第一次输入密码不能为空!");
return false;
}
}</script>
<title>用户修改密码</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="keywords" content="Discuz!,Board,Comsenz,forums,bulletin board,">
<meta name="description" content="专区 - Discuz! Board">
<meta name="generator" content="Discuz! 4.0.0RC4 with Templates 4.0.0">
<meta name="MSSmartTagsPreventParsing" content="TRUE">
<meta http-equiv="MSThemeCompatible" content="Yes">
<style type="text/css"><!--
a { text-decoration: none; color: #000000; }
a:hover { text-decoration: underline;color: red;}
.nav { font: 12px Verdana,Tahoma; color: #000000; font-weight: normal }
.nav a { color: #000000 }
.header { font: 15px Verdana,Tahoma; color: #000000; font-weight: bold}
.header a { color: #FFFFFF }
.tableborder { background:#54A5F2;solid #FFFFFF}
.altbg1 { background: #F3F6FA }
.altbg2 { background: #FFFFFF }
--></style>
</head><form method="post" name="register" action="ChangeUserPassword.jsp" onSubmit="this.regsubmit.disabled=true;">
<input type="hidden" name="action" value="modify"/>
<table class="tableborder" align="center" cellpadding="0" cellspacing="1" width="40%">
<tr>
<img src="images/cpw.gif"/>
</tr>
<tr>
<td width="50%" align="right">请输出新密码</td>
<td width="50%"><input type="password" name="password" id="password"/></td>
</tr>
<tr>
<td align="right">请再次输出密码</td>
<td><input type="password" name="password2" id="password2"/></td>
</tr>
<tr>
<td></td>
<td align="left"><input name="regsubmit" value="提 交" type="submit" onclick="on check()"></td>
</tr>
</table>
</form>
</body>
</html>
解决方案 »
- hibernate的one-to-many和many-to-one的级联保存问题
- hql语句怎么关联两个表,初学者求救!!
- ORACLE查询问题
- Jbuilder9使用的一个问题。
- HttpClient 中的https应该怎么办!!!!(高分顶着有分)
- Ejb中包含的JAP是一种什么技术,告急???
- Web开发
- struts的Servlet action is not available 问题?难,和以前都不同
- 我的搜索引擎站点开通了,到目前为止从构思到编码,到服务器的安装,域名申请总共用时间不到 2 周.请批评指正. 地址 www.519so.com
- 新手问题(EJB),那位大虾教我啊
- 用JQuery实现文件的上传
- 谁有java ee 5的源代码啊?
<input name="regsubmit" value="提 交" type="submit" onclick="on check()">
改成
<input name="regsubmit" value="提 交" type="submit" onclick="check()">
还有
if(password1==null){
改成
if(password1==""){