jt
2021-06-10 5d0d028456874576560552f5a5c4e8b801786f11
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
@{
    ViewBag.Title = "修改密码";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
 
@section scripts{
    <script type="text/javascript">
        $(function () {
 
        })
 
        //保存
        function Save() {
            var oldpsd = $("#ResUserPassword").val().trim();
            var newpsd = $("#NewUserPassword").val().trim();
            var renewpsd = $("#ConfirmNewUserPassword").val().trim();
            if (oldpsd == "") {
                parent.ShowMsg("原登录密码不能为空!");
                return false;
            }
            if (newpsd == "") {
                parent.ShowMsg("新登录密码不能为空!");
                $("#NewUserPassword").focus();
                return false;
            }
            if (newpsd.length < 6 || newpsd.length > 20) {
                parent.ShowMsg("密码长度为6-20个字符!");
                return false;
            }
            if (newpsd != renewpsd) {
                parent.ShowMsg("您两次输入的新密码不一致,请重新输入!");
                return false;
            }
            if (oldpsd != "" && newpsd != "") {
                var ajaxData = { oldPwd: oldpsd, newPwd: newpsd };
                var ajaxUrl = "/Home/PwdEdit";
                var data = AjaxManagers(ajaxData, ajaxUrl);
                if (data != null) {
                    if (data.Success) {
                        parent.ShowMsg("保存成功!");
                        parent.$('#openFrameDiv').dialog('close');
                    }
                    else {
                        parent.ShowMsg("保存失败:" + data.Msg);
                    }
                }
            }
        }
    </script>
}
 
<div class="tabsList">
    <table border="0" cellpadding="0" cellspacing="5" width="100%">
        <tbody>
 
            <tr>
                <td width="140" style="text-align: right;">
                    <span style="color: red;">*</span>原登录密码:
                </td>
                <td>
                    <input class="inputText wf180" autocomplete="off" id="ResUserPassword" name="ResUserPassword" type="password" />
                </td>
            </tr>
            <tr>
                <td style="text-align: right;">
                    <span style="color: red;">*</span>新登录密码:
                </td>
                <td>
                    <input class="inputText wf180" autocomplete="off" id="NewUserPassword" name="NewUserPassword" type="password" />
                </td>
            </tr>
            <tr>
                <td style="text-align: right; ">
                    <span style="color: red;">*</span>确认新密码:
                </td>
                <td>
                    <input class="inputText wf180" autocomplete="off" id="ConfirmNewUserPassword" name="ConfirmNewUserPassword" type="password" />
                </td>
            </tr>
        </tbody>
    </table>
</div>
<div class="popBottom">
    <a href="javascript:void(0)" onclick="return Save()" class="button blueButton">确定</a>
    <a href="javascript:void(0)" onclick="parent.$('#openFrameDiv').dialog('close');" class="button">关闭</a>
</div>