用jsp java做一个修改登录密码的程序

谁能把代码给一下或者给一些相关的网站链接就是点修改密码之后出来一个框里面有输入旧密码新密码然后点修改我刚学JAVA才几天非常感谢... 谁能把代码给一下 或者给一些相关的网站 链接
就是点修改密码之后 出来一个框 里面有输入旧密码 新密码 然后点修改
我刚学JAVA才几天 非常感谢
展开
 我来答
匿名用户
推荐于2018-03-13
展开全部
<a>修改密码</a>
<table align="center">
<tr><td>旧密码:</td>
<td><input type="password" name="password" size="10" /></td>
</tr>
<tr> <td>新密码</td>
<td><input type="password" name="password1" size="10" /></td>
</tr>
<tr> <td>确认密码</td>
<td><input type="password" name="password2" size="10" /></td>
</tr>
<td calspan="2"><input type="submit" name="submit" value="修改"></td>
</table>
//1.$.ajax带json数据的异步请求
var aj = $.ajax( {
url:'passwordUpdate',// 跳转到修改密码的 action
data:{
oldpass: old,
mobile: mobileNo,
PROVINCECODE : PROVINCECODE
},
type:'post',
cache:false,
dataType:'json',
success:function(data) {
if(data.msg =="true" ){
// view("修改成功!");
alert("修改成功!");
window.location.reload();
}else{
view(data.msg);
}
},
error : function() {
// view("异常!");
alert("异常!");
}
});
qingdaowpj
推荐于2016-04-24 · TA获得超过281个赞
知道小有建树答主
回答量:94
采纳率:0%
帮助的人:112万
展开全部
<html>
<head>
<base href="<%=basePath%>">

<title>修改用户信息</title>

</head>
<script language="JavaScript">
function update(){
if(window.document.userLoginForm.newPassWord.value != window.document.userLoginForm.againPassWord.value) {
alert("两次密码输入不一致,请重新输入");
return false;
}

window.document.userLoginForm.passWord.value = window.document.userLoginForm.newPassWord.value;
window.document.userLoginForm.action="./userUpdate.do";
window.document.userLoginForm.submit();

}

function back() {
window.document.userLoginForm.action="./module.do?method=Find";
window.document.userLoginForm.submit();
}
</script>
<body>
<form id="userLoginForm" name="userLoginForm" method="post">
<table width="300" align="center" border="1">
<tr>
<td>原始密码: <input type="password"
name="oldPassWord"><font color="#FF0000">*</font></td>
</tr>
<tr>
<td>新密码: <input
type="password" name="newPassWord"><font color="#FF0000">*</font></td>
</tr>
<tr>
<td>验证新密码:<input type="password" name="againPassWord"><font
color="#FF0000">*</font></td>
</tr>
<tr>
<td><input type="hidden" name="passWord"></td>
</tr>
<tr align="center">
<td><font color="#FF0000"><html:errors bundle="system" property="error" /></font></td>
</tr>
<tr>
<td> <input
type="button" value="修 改" onclick="update()">
<input type="button"
value="返 回" onclick="back()"></td>
</tr>
</table>
</form>
</body>
</html>

http://download.csdn.net/source/363681
本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
东方日出席边郁
2008-09-17 · 超过31用户采纳过TA的回答
知道答主
回答量:137
采纳率:0%
帮助的人:0
展开全部
Index.jsp
<script language="javascript">
function clickShow()
{
//如果向你说的弹出一个框,在window.open()里面加参数,height width scrollbar 等等,挺多,你自己查一下
Window.open(“update.jsp”);

}
</script>
<html>
<input type=”button” value=”修改密码” onclick=”javascript:clickShow()”>
</html>

Update.jsp
<html>
<script language="javascript">
Function validate()
{
//验证pw1、pw2是否一致,验证3个密码长度是否大于你规定的最小位数等等
}
</script>

原始密码:<input type=”text” name=”pw”>
新密码<input type=”text” name=”pw1”>
确认新密码<input type=”text” name=”pw2”>
<input type=”button” value=”修改” onclick=”validate”>
</html>
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
科技发现之旅
2019-03-23 · TA获得超过3817个赞
知道小有建树答主
回答量:3153
采纳率:29%
帮助的人:166万
展开全部
<html>
<head>
<base
href="<%=basePath%>">
<title>修改用户信息</title>
</head>
<script
language="JavaScript">
function
update(){
if(window.document.userLoginForm.newPassWord.value
!=
window.document.userLoginForm.againPassWord.value)
{
alert("两次密码输入不一致,请重新输入");
return
false;
}
window.document.userLoginForm.passWord.value
=
window.document.userLoginForm.newPassWord.value;
window.document.userLoginForm.action="./userUpdate.do";
window.document.userLoginForm.submit();
}
function
back()
{
window.document.userLoginForm.action="./module.do?method=Find";
window.document.userLoginForm.submit();
}
</script>
<body>
<form
id="userLoginForm"
name="userLoginForm"
method="post">
<table
width="300"
align="center"
border="1">
<tr>
<td>原始密码:
<input
type="password"
name="oldPassWord"><font
color="#FF0000">*</font></td>
</tr>
<tr>
<td>新密码:
<input
type="password"
name="newPassWord"><font
color="#FF0000">*</font></td>
</tr>
<tr>
<td>验证新密码:<input
type="password"
name="againPassWord"><font
color="#FF0000">*</font></td>
</tr>
<tr>
<td><input
type="hidden"
name="passWord"></td>
</tr>
<tr
align="center">
<td><font
color="#FF0000"><html:errors
bundle="system"
property="error"
/></font></td>
</tr>
<tr>
<td>
<input
type="button"
value="修
改"
onclick="update()">
<input
type="button"
value="返
回"
onclick="back()"></td>
</tr>
</table>
</form>
</body>
</html>
http://download.csdn.net/source/363681
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 更多回答(2)
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式