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.

77 lines
2.6 KiB

4 days ago
  1. @{
  2. ViewBag.Title = "Form";
  3. Layout = "~/Views/Shared/_Form.cshtml";
  4. }
  5. <style>
  6. .password-eye-span {
  7. position: absolute;
  8. right: 10px;
  9. top: 5px;
  10. cursor: pointer;
  11. color: #ccc;
  12. }
  13. </style>
  14. <script>
  15. var keyValue = $.request("keyValue");
  16. $(function () {
  17. $("#F_Account").val($.request('account'));
  18. $("#F_RealName").val($.request('realName'));
  19. });
  20. function submitForm() {
  21. debugger;
  22. if (!$('#form1').formValid()) {
  23. return false;
  24. }
  25. var postData = $("#form1").formSerialize();
  26. postData["userPassword"] = $("#F_UserPassword").val();
  27. postData["keyValue"] = $("#F_Account").val();
  28. $.submitForm({
  29. url: "/SystemManage/User/SubmitRevisePassword3",
  30. param: postData,
  31. success: function () {
  32. top.location.href = "/Home/Index";
  33. }
  34. })
  35. }
  36. function userPasswordEye(name, type) {
  37. debugger;
  38. let id = "#" + name;
  39. let typeValue = '';
  40. if(type === 'onmousedown') {
  41. $(id).siblings(".password-eye-span").css("color", "#00FEBF");
  42. typeValue = 'text'; // 明文显示
  43. } else {
  44. $(id).siblings(".password-eye-span").css("color", "#ccc");
  45. typeValue = 'password'; // 密文显示
  46. }
  47. $(id).attr("type", typeValue);
  48. }
  49. </script>
  50. <form id="form1">
  51. <div style="padding-top: 30px; margin-right: 40px;">
  52. <table class="form">
  53. <tr>
  54. <th class="formTitle">账户</th>
  55. <td class="formValue">
  56. <input id="F_Account" name="F_Account" readonly type="text" class="form-control" />
  57. </td>
  58. </tr>
  59. @*<tr>
  60. <th class="formTitle">姓名</th>
  61. <td class="formValue">
  62. <input id="F_RealName" name="F_RealName" readonly type="text" class="form-control" />
  63. </td>
  64. </tr>*@
  65. <tr>
  66. <th class="formTitle">密码</th>
  67. <td class="formValue">
  68. <input id="F_UserPassword" name="F_UserPassword" type="password" class="form-control required" placeholder="请输入新密码" />
  69. <span class="glyphicon glyphicon-eye-close form-control-feedback password-eye-span"
  70. onmousedown="userPasswordEye('F_UserPassword', 'onmousedown')"
  71. onmouseup="userPasswordEye('F_UserPassword', 'onmouseup')"></span>
  72. </td>
  73. </tr>
  74. </table>
  75. </div>
  76. </form>