Hotel/js/jQuery.Ajax.js

(开头部分) 4KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

$.ajaxjson = function (url, dataMap, fnSuccess) {
    $.ajax({
        type: "POST",
        url: url,
        data: dataMap,
        dataType: "json",
        beforeSend: function () { top.$.hLoading.show(); },
        complete: function () { top.$.hLoading.hide(); },
        success: fnSuccess
    });
}
$.ajaxtext = function (url, dataMap, fnSuccess) {
    $.ajax({
        type: "POST",
        url: url,
        data: dataMap,
        beforeSend: function () { top.$.hLoading.show(); },
        complete: function () { top.$.hLoading.hide(); },
        success: fnSuccess
    });
}


function autoResize(options) {
    var defaults = {
        width: 6,
        height: 119,
        gridType: 'jqgrid'
    };
    options = $.extend(defaults, options);

    // 第一次調用
    var wsize = getWidthAndHeigh();
    if ($.isFunction(options.callback)) {
        options.callback(wsize);
    }

    // 視窗大小改變的時候
    $(window).resize(function () {
        var size = getWidthAndHeigh(true);
        switch (options.gridType) {
            case "datagrid":
                $(options.dataGrid).datagrid('resize', { width: size.width, height: size.height });
                break;
            case "treegrid":
                $(options.dataGrid).treegrid('resize', { width: size.width, height: size.height });
                break;
            case "jqgrid":
                $(options.dataGrid).jqGrid('setGridHeight', size.height).jqGrid('setGridWidth', wsize.width);
                break;
        }
    });

    // 取得iframe大小
    function getWidthAndHeigh(resize) {
        var windowHeight = 0;
        var widowWidth = 0;
        if (typeof (window.innerHeight) == 'number') {
            windowHeight = window.innerHeight;
            widowWidth = window.innerWidth;
后面还有 101 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。