You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

29 lines
641 B

  1. function save_all_info(){
  2. var ago = $('#agoInput').val();
  3. var now = $('#nowInput').val();
  4. var affirm = $('#affirmInput').val();
  5. if(now != affirm){
  6. alert('两次密码不同');
  7. return;
  8. }else{
  9. $.ajax({
  10. url:'./st-xm/Api/changePassword.php', //请求地址
  11. type: "post", //请求方式
  12. data: {agoPwd:ago,nowPwd:now}, //请求参数
  13. async:false,
  14. dataType: "json",
  15. success: function (date) {
  16. if(date.code==0){
  17. alert('保存成功');
  18. } else {
  19. alert(date.errinfo);
  20. }
  21. },
  22. fail: function (date) {
  23. alert(date.errinfo);
  24. }
  25. });
  26. }
  27. }