    var l = $('#submit').ladda();
    var isEnd = false;
    function login() {
        var flag = checkSearchForm();
        var dataArr = $("#loginform").serializeArray();
        if(flag && dataArr && !isEnd){
            isEnd = true;
            var param = {};
            $.each(dataArr, function (i, obj) {
                param[obj.name] = $.trim(obj.value);
            });
            l.ladda( 'start' );
            $.ajax({
                url: "/login",
                type: "post",
                data: param,
                success: function (data) {
                    isEnd = false;
                    if ((data && (typeof data=='string')) || data.success) {
                        window.location.reload (true);
                    } else {
                        showMsg(data.msg);
                    }
                    l.ladda( 'stop' );
                }
            });
        }

    }