惠州统计年鉴
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.

editpwd.html 5.5 KiB

2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>莱欧前台框架</title>
  7. <link rel="shortcut icon" href="favicon.ico"> <link href="css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
  8. <link href="css/font-awesome.css?v=4.4.0" rel="stylesheet">
  9. <link href="css/animate.css" rel="stylesheet">
  10. <link href="css/style.css?v=4.1.0" rel="stylesheet">
  11. <script src="js/jquery.min.js?v=2.1.4"></script>
  12. <script src="js/bootstrap.min.js?v=3.3.6"></script>
  13. <!-- 模态框js -->
  14. <script src="js/demo.js?v=1.1"></script>
  15. <!-- 自定义js -->
  16. <script src="js/plugins/validate/jquery.validate.min.js"></script>
  17. <script src="js/plugins/validate/messages_zh.min.js"></script>
  18. <script src="js/demo/form-validate-demo.js?v1.0.1"></script>
  19. <script type="text/javascript">
  20. function updatapwd(){
  21. document.getElementById("div1").style.display="none";
  22. var password=$("#password").val();
  23. if(password==""|| password.length==0){
  24. $("#pwd1").html("新密码不能为空");
  25. document.getElementById("div1").style.display="block";
  26. return;
  27. }
  28. var pwdRegex = /^(?=.*\d)(?=.*[a-zA-Z])[\da-zA-Z]{6,16}$/;//new RegExp('(?=.*[0-9])(?=.*[a-zA-Z]).{8,16}');
  29. if(!pwdRegex.test(password)){
  30. $("#pwd1").html("密码必须为8~16位数字和字母的组合");
  31. document.getElementById("div1").style.display="block";
  32. return;
  33. }
  34. var confirm_password=$("#confirm_password").val();
  35. if(confirm_password==""){
  36. $("#pwd2").html("确认密码不能为空");
  37. document.getElementById("div2").style.display="block";
  38. return;
  39. }
  40. $.ajax({
  41. type:"Post",
  42. url:"../login/submitPassword.service",
  43. data:{
  44. password:password,
  45. confirm_password:confirm_password
  46. },
  47. dataType:"json",
  48. success:function(data){
  49. if(data.success=='true'){
  50. showModal(data.message);//提示框
  51. return;
  52. }else{
  53. showModal(data.message);//提示框
  54. return;
  55. }
  56. }
  57. });
  58. }
  59. </script>
  60. </head>
  61. <body class="gray-bg">
  62. <div class="wrapper wrapper-content animated fadeInRight">
  63. <div class="row">
  64. <div class="col-sm-10">
  65. <div class="ibox float-e-margins">
  66. <div class="ibox-title">
  67. <h5>修改密码</h5>
  68. </div>
  69. <div class="ibox-content">
  70. <form class="form-horizontal m-t" id="signupForm">
  71. <div class="form-group">
  72. <label class="col-sm-3 control-label"><font color=red>*</font>&nbsp;密码:</label>
  73. <div class="col-sm-8">
  74. <input id="password" name="password" class="form-control" type="password">
  75. <div style="display: none" id="div1">
  76. <span id="pwd1" style="color: red;" ></span>
  77. </div>
  78. </div>
  79. </div>
  80. <div class="form-group">
  81. <label class="col-sm-3 control-label"><font color=red>*</font>&nbsp;确认密码:</label>
  82. <div class="col-sm-8">
  83. <input id="confirm_password" name="confirm_password" class="form-control" type="password" >
  84. <div style="display: none" id="div2">
  85. <span id="pwd2" style="color: red;"></span>
  86. </div>
  87. <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 请再次输入您的密码</span>
  88. </div>
  89. </div>
  90. <div style="display: none" id="div1">
  91. <span id="msg" style="color: red;"></span>
  92. </div>
  93. <label class="col-sm-3 control-label"></label>
  94. <span style="color: red;"> *注:密码必须为6~16位数字和字母的组合</span>
  95. <div class="form-group">
  96. <div class="col-sm-8 col-sm-offset-3" style="margin-top: 10px">
  97. <button class="btn btn-primary" type="button" onclick="updatapwd()">修改密码</button>
  98. </div>
  99. </div>
  100. </form>
  101. </div>
  102. </div>
  103. </div>
  104. </div>
  105. </div>
  106. <!-- 模态框开始 -->
  107. <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  108. <div class="modal-dialog">
  109. <div class="modal-content">
  110. <div class="modal-header">
  111. <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
  112. &times;
  113. </button>
  114. <h4 class="modal-title" id="myModalLabel">
  115. 提示
  116. </h4>
  117. </div>
  118. <div class="modal-body" id="mycontent">
  119. </div>
  120. <div class="modal-footer">
  121. <button type="button" class="btn btn-default" data-dismiss="modal" >关闭
  122. </button>
  123. <!-- <button type="button" class="btn btn-primary">
  124. 提交更改
  125. </button> -->
  126. </div>
  127. </div><!-- /.modal-content -->
  128. </div><!-- /.modal -->
  129. </div>
  130. <!-- 模态框结束 -->
  131. </body>
  132. </html>