在我的应用程序中,我确实更改了密码页面,当我输入密码并单击按钮时,它会引发成功的消息,当我单击取消按钮时它也会更改密码如何通过单击取消按钮来停止更改密码
var udet = ['ChangePassword',$('#txtNewPassword').val(),$('#txtOldPwd').val()]
$.ajax({
type: "Post",
url: "UserRegistration", //Servlet page here have code for checks current passowrd
dataType:'json',
data:{json:udet},
success: function(data)
{
if(data=="Password Changed Successfully"){
confirmDialog($("#message").html("<span style=color:black;>"+data+"</span>"), function(){
$(window.location).attr('href', "Home.jsp");
});
}
else{
$("#message").html(data);
$('#txtOldPwd').val('');
$('#txtNewPassword').val('');
$('#txtCnfirmPwd').val('');
}
}
});