PageSourceSearch

http://mtg.polymer.cn/js/u_login.js

js polymer.cn collected 2026-10-01 11:54:52 UTC 1,864 bytes, 46 lines download raw bytes

1
2$(function () {
3    changeMenu();
4    $('#t_name').validatebox({ required: true, missingMessage: msg_json.msg1 });
5    $('#t_pwd').validatebox({ required: true, missingMessage: msg_json.msg2, validType: "minLength[6]" });
6    $('#btnLogin').bind('click', function () { login_go() });
7});
8function login_go() {
9    var is_flag = $('#t_name').validatebox('isValid') && $('#t_pwd').validatebox('isValid');
10    if (!is_flag) { return; }
11    $('#t_msg').html(msg_json.msg3);
12    var jse_en = new jse();
13    jse_en.setPublicKey(_json.pk);
14    var encrypted_pwd = jse_en.encrypt($.trim($('#t_pwd').val()));
15    $.ajax({
16        url: "u_login", type: 'post', headers: { 'VerificationTakon': _json.takon },
17        data: { sv: $.trim($('#t_name').val()), pwd: encrypted_pwd, id: _json.mid, mn: _json.mn, en: _json.en },
18        success: function (reg) {
19            if (reg == 0) {
20                $.messager.alert('error', msg_json.msg6);
21            } else if (reg == 1) {
22                $.messager.alert('error', msg_json.msg7);
23            } else if (reg == 2) {
24                $.messager.alert('error', msg_json.msg8);
25            } else {
26                location.href = reg;
27            } $('#t_msg').html(''); is_flag = false;
28        }, onLoadError: function () {
29            is_flag = false; $('#t_msg').html('');
30            $.messager.alert('Warning', msg_json.msg4);
31        }
32    });
33}
34function check_enter(event) { if (event.keyCode == 13) { login_go(); } }
35function changeMenu() {
36    var _url = document.URL;
37    var _muns = document.getElementById("dv_MidNav").getElementsByTagName("a"); ;
38    for (var i = 0; i < _muns.length; i++) {
39        if (_muns[i].href == _url) {
40            _muns[i].style.color = "#FFFF00";
41        }
42        else {
43            _muns[i].style.color = "white";
44        }
45    }
46}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.