用jsp java做一个修改登录密码的程序
谁能把代码给一下或者给一些相关的网站链接就是点修改密码之后出来一个框里面有输入旧密码新密码然后点修改我刚学JAVA才几天非常感谢...
谁能把代码给一下 或者给一些相关的网站 链接
就是点修改密码之后 出来一个框 里面有输入旧密码 新密码 然后点修改
我刚学JAVA才几天 非常感谢 展开
就是点修改密码之后 出来一个框 里面有输入旧密码 新密码 然后点修改
我刚学JAVA才几天 非常感谢 展开
4个回答
推荐于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("异常!");
}
});
<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("异常!");
}
});
展开全部
<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
<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
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
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>
<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>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
<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
<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
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询