| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 635 人关注过本帖
标题:急!求学解答,js代码解说。。。。。。。难,请高手帮解决?
取消只看楼主 加入收藏
andyjkl
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2012-5-15
结帖率:0
收藏
已结贴  问题点数:20 回复次数:0 
急!求学解答,js代码解说。。。。。。。难,请高手帮解决?
/*
 * jQuery blockUI plugin
 */

;(function($) {

if (/1\.(0|1|2)\.(0|1|2)/.test($.fn.jquery) || /^1.1/.test($.fn.jquery)) {
    alert('blockUI requires jQuery v1.2.3 or later!  You are using v' + $.fn.jquery);
    return;
}

// global $ methods for blocking/unblocking the entire page
$.blockUI   = function(opts) { install(window, opts); };
$.unblockUI = function(opts) { remove(window, opts); };

// plugin method for blocking element content
$.fn.block = function(opts) {
    return this.each(function() {
        if ($.css(this,'position') == 'static')
            this.style.position = 'relative';
        if ($.browser.msie)
            this.style.zoom = 1; // force 'hasLayout'
        install(this, opts);
    });
};

// plugin method for unblocking element content
$.fn.unblock = function(opts) {
    return this.each(function() {
        remove(this, opts);
    });
};

$.blockUI.version = 2.09; // 2nd generation blocking at no extra cost!

// override these in your code to change the default behavior and style
$.blockUI.defaults = {
    // message displayed when blocking (use null for no message)
    message:  'Please wait...',
   
    // styles for the message when blocking; if you wish to disable
    // these and use an external stylesheet then do this in your code:
    // $.blockUI.defaults.css = {};
    css: {
        padding:        0,
        margin:         0,
        width:          '300px',
        top:            '30%',
        left:           '50%',
        marginLeft:     '-150',
        textAlign:      'center',
        color:          '#000',
        border:         '1px solid #3b555c',
        backgroundColor:'#cbddef',
        padding:        '10px',
        cursor:         'wait'
    },
   
    // styles for the overlay
    overlayCSS:  {
        backgroundColor:'#000',
        opacity:        '0.3'
    },
   
    // z-index for the blocking overlay
    baseZ: 1000,
   
    // set these to true to have the message automatically centered
    centerX: true, // <-- only effects element blocking (page block controlled via css above)
    centerY: true,
   
    // allow body element to be stetched in ie6; this makes blocking look better
    // on "short" pages.  disable if you wish to prevent changes to the body height
    allowBodyStretch: true,
   
    // be default blockUI will supress tab navigation from leaving blocking content;
    constrainTabKey: true,
   
    // fadeOut time in millis; set to 0 to disable fadeout on unblock
    fadeOut:  400,
   
    // if true, focus will be placed in the first available input field when
    // page blocking
    focusInput: true,
   
    // suppresses the use of overlay styles on FF/Linux (due to performance issues with opacity)
    applyPlatformOpacityRules: true,
   
    // callback method invoked when unblocking has completed; the callback is
    // passed the element that has been unblocked (which is the window object for page
    // blocks) and the options that were passed to the unblock call:
    //     onUnblock(element, options)
    onUnblock: null
};

// private data and functions follow...

var ie6 = $.browser.msie && /MSIE 6.0/.test(navigator.userAgent);
var pageBlock = null;
var pageBlockEls = [];

function install(el, opts) {
    var full = (el == window);
    var msg = opts && opts.message !== undefined ? opts.message : undefined;
    opts = $.extend({}, $.blockUI.defaults, opts || {});
    opts.overlayCSS = $.extend({}, $.blockUI.defaults.overlayCSS, opts.overlayCSS || {});
    var css = $.extend({}, $.blockUI.defaults.css, opts.css || {});
    msg = msg === undefined ? opts.message : msg;

    // remove the current block (if there is one)
    if (full && pageBlock)
        remove(window, {fadeOut:0});
   
    // if an existing element is being used as the blocking content then we capture
    // its current place in the DOM (and current display style) so we can restore
    // it when we unblock
    if (msg && typeof msg != 'string' && (msg.parentNode || msg.jquery)) {
        var node = msg.jquery ? msg[0] : msg;
        var data = {};
        $(el).data('blockUI.history', data);
        data.el = node;
        data.parent = node.parentNode;
        data.display = node.style.display;
        data.position = node.style.position;
        data.parent.removeChild(node);
    }
   
    var z = opts.baseZ;
   
    // blockUI uses 3 layers for blocking, for simplicity they are all used on every platform;
    // layer1 is the iframe layer which is used to supress bleed through of underlying content
    // layer2 is the overlay layer which has opacity and a wait cursor
    // layer3 is the message content that is displayed while blocking
   
    var lyr1 = ($.browser.msie) ? $('<iframe class="blockUI" style="z-index:'+ z++ +';border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="javascript:false;"></iframe>')
                                : $('<div class="blockUI" style="display:none"></div>');
    var lyr2 = $('<div class="blockUI blockOverlay" style="z-index:'+ z++ +';cursor:wait;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');
    var lyr3 = full ? $('<div class="blockUI blockMsg blockPage" style="z-index:'+z+';position:fixed"></div>')
                    : $('<div class="blockUI blockMsg blockElement" style="z-index:'+z+';display:none;position:absolute"></div>');

    // if we have a message, style it
    if (msg){
        lyr3.css(css);
        lyr3.css('left', $.browser.msie ? '50%' : (document.body.offsetWidth-parseInt(css.width))/2 + "px");
        lyr3.css('marginLeft', $.browser.msie ? -parseInt(css.width)/2 + "px" : '');
    }

    // style the overlay
    if (!opts.applyPlatformOpacityRules || !($.browser.mozilla && /Linux/.test(navigator.platform)))
        lyr2.css(opts.overlayCSS);
        lyr2.css('position', full ? 'fixed' : 'absolute');
   
    // make iframe layer transparent in IE
    if ($.browser.msie)
        lyr1.css('opacity','0.0');

    $([lyr1[0],lyr2[0],lyr3[0]]).appendTo(full ? 'body' : el);
   
    // ie7 must use absolute positioning in quirks mode and to account for activex issues (when scrolling)
    var expr = $.browser.msie && (!$.boxModel || $('object,embed', full ? null : el).length > 0);
    if (ie6 || expr) {
        // give body 100% height
        if (full && opts.allowBodyStretch && $.boxModel)
            $('html,body').css('height','100%');

        // fix ie6 issue when blocked element has a border width
        if ((ie6 || !$.boxModel) && !full) {
            var t = sz(el,'borderTopWidth'), l = sz(el,'borderLeftWidth');
            var fixT = t ? '(0 - '+t+')' : 0;
            var fixL = l ? '(0 - '+l+')' : 0;
        }

        // simulate fixed position
        $.each([lyr1,lyr2,lyr3], function(i,o) {
            var s = o[0].style;
            s.position = 'absolute';
            if (i < 2) {
                full ? s.setExpression('height','document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + "px"')
                     : s.setExpression('height','this.parentNode.offsetHeight + "px"');
                full ? s.setExpression('width','jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"')
                     : s.setExpression('width','this.parentNode.offsetWidth + "px"');
                if (fixL) s.setExpression('left', fixL);
                if (fixT) s.setExpression('top', fixT);
            }
            else if (opts.centerY) {
                if (full) s.setExpression('top','(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');
                s.marginTop = 0;
            }
        });
    }
   
    // show the message
    lyr3.append(msg).show();
    if (msg && (msg.jquery || msg.nodeType))
        $(msg).show();

    // bind key and mouse events
    bind(1, el, opts);
        
    if (full) {
        pageBlock = lyr3[0];
        pageBlockEls = $(':input:enabled:visible',pageBlock);
        if (opts.focusInput)
            setTimeout(focus, 20);
    }
    else
        center(lyr3[0], opts.centerX, opts.centerY);
};

// remove the block
function remove(el, opts) {
    var full = el == window;
    var data = $(el).data('blockUI.history');
    opts = $.extend({}, $.blockUI.defaults, opts || {});
    bind(0, el, opts); // unbind events
    var els = full ? $('body').children().filter('.blockUI') : $('.blockUI', el);
  #@ & P~~,
PP,
~wmo + ~sGm0P {
    P2lLn~VGm03VkPx~EVsI@#@ & @#@ & ,
    ~,
    Pr6PvWwD / cWl9 + 6ED#~`@#@ & P,
    ~P,
    PP,
    ns / c0mNnr;
    OvW2Yk 0mNn6 ! Y#I@#@ & P~P,
    ~,
    P~k + DKks + K;
    Yv0;
    x1YrG`#,
    `PM + /Oc+^/BNCYCSKwO / BnV * i~NBPW2OkRWl9n
}
EO * i@#@ & P,
P,
N@#@ & P~P,
+sd@#@ & ,
~P,
PP,
~. + k + D`nVdS,
NCYmSPKwOdBP + sbp@#@ & 8p@#@ & @#@ & Jz,
:W7 + ,
8VKmVk o~n ^ +:UY,
4l1V~k YKPOtn~Gr\PS4 + M + ~rDP / OCMYnN@#@ & 6EU1YbWx,
Dd + D`nVk~ [CDl~K2Yk~ + ^b~@#@ & , P~PnskRnl14`6EU ^ DkWUcb~G#, `@#@ & ~, P, PP, PJ & PM + hW7 + ~ - blPG6H, ml ^ sdPkW, hnP[G BOP ^ G / Pn - xY~4mx[V.k@#@ & , P, PP, P, r0, `Otb / 2mD + O1KN + *~@#@ & , P, P~P~~, P~PD4kkR2CM + xOHKNnRMnsW - Z4kV9`D4kk#I@#@ & P~~, 8#p@#@ & , PP, rWPvNmYCP '', NCYm + ^#~`@#@ & P~~, P~P, [mYCc + ^R / DX ^ nR9kdw ^ lz~ {
    PNmOlcNkk2slHi@#@ & ~P~~,
    P~P9CYmRnsc / YzsR2WkrDkG P {
        PNmYm wK / rYbWUI@#@ & P,
        ~P,
        PP,
        [CYmRal. + UOcl2wUN; trs9`NCOmRnV * I@#@ & ~, P, PP, PfcNmYCRVb M + :K - +GlYmcv4 ^ W13iq 4b / OWMzB * i@#@ & , PP~N@#@ & ~P, ~b0~vYHw + K0, GwD / W jU8 ^ Wm0~'{PB6;UmDkKxv#@#@&,P~P,~P,W2OkRWUi    4sW1Vv+sBWaY/*i@#@&8p@#@&@#@&z&~(kx9&E    4k    [~Y4+,tCx[sD@#@&6;x1YrG    P4rU9`8~,n^~~KwD/#,    @#@&P,P~\mD~W!VV,xPVP{x~hbx9WA~~yV~', y`VbI@#@ & P~~, @#@ & P, ~, z & , NKxBDP(GY4 + .P ! x8r Nk LPb0PD4nDPb / ~xGO4kUo, OW, EU8bxN@#@ & , P~PbW, `Z(PL[Pv0 ! sV, ['PewCLAVK^3,uu,ZWE^V,['PZyV NmOlvB8sKm3i(ckdA ^ G13n9B * ##, @#@ & ~P, P~P, P.nDED I@#@ & PP, ~r0, `e0; Vsb, @#@ & P, ~P, P~~f + V[mYC`E8 ^ W ^ 0j & RkkA ^ Gm0 + [BBP8bp@#@ & , ~P, PP, ~@#@ & , P, P & z~8bx[PmUm4W.d, lx[~bx2EDd, 0GMPsWEk + , Cx9PV + HPn - xYk@#@ & , PP, -CD, +7 + UYd~ {
            Pv: K;
            /NGA    P:G;k+;w,VX[Kh    P3Xa.+k/~m ^ k ^ VEi@#@ & ~P,
            P4,
            _~ ^ vNKm;: nUD#4bUNv + -n Y / S~KwO / B~4lU9VD#,
            ), y`9W ^ Es + UO * RE 8k N` - nxD / BP4lU[ ^ +.#p@#@ & @#@ && &, 0W.hD~ks2 ^ R c@#@ & zz, P, ~\mD~ ^ Px~f`BmS) bxw ! Ov#p@#@ & z & P~~, 4~g, y + c4rU9` + -n Yd~, GaYdBP4lx9V.#, )~ ^ R; U(kx9c + 7 + xDdSP4l Ns + .bp@#@ & 8p@#@ & @#@ && &, +\nUDP4l[ ^ +., YKP / !wa. + k / ~3X8GmDNJhW ! /+,n-+    YkPAtnU,4sW1Vk    o@#@&6Ex^ObWUP4C    NsDv+#,    @#@&P,P~zJPCs^Wh,Ol(Pxm-romYbWUPc^Kx[kDrW    lssH#@#@&~,P~k6~v+ 0+HZW9+,'[,+ 3X/G9 + P {
                xPO#PP@#@ & P,
                P,
                P~P~r6PcwmL + ~VG ^ 0P['~R[lDCcmG    /DDlbx:C4n+z#,    @#@&,PP,~P,PP,~~\mD,+s/~x,wCo$VKmV3^/i@#@&,P~P,~,P~,P,\lMP6AN,'~"Rd4b0YnnX,[[,n YmDT+OPxx,+s/]nVkRsn    oY4R8TI@#@&~,P~,P,PP,P,-lMP8l13~x,+Rk4k6Y|z~[LPROl.LY~'{~+^/,TYi@#@&~,P~P,~,P~,Pb0Pv0S[P-u~4mmVb,    @#@&~P,PP,~~P,P,P~P~dYPksnW!YcW!xmOrKxc#PWKm;k`(lm0#)SFZ#I@#@&P~~,PP,~P,PP,~~PM+DE.x~WmVd+p@#@&,P~~,PP~~,P~8@#@&,P~,P,PP)@#@&~P,PN@#@&P~~,zz,CV^Wh,n-+    YkPAkO4bx~Y4nPs+ddmo+~^KxO+    O@#@&~,P,k0,`fc+cYCDT+ObcwlMnxD/`E[r\c4^W^3\dTBbR^nxTY4~@*P!b@#@&P~P,~,P~M+DED    PD.Ei@#@&,P~~,PP,@#@&,PP,&&P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1VCdk'B2A; VG / v@ * @ ! &9k7@ * @ ! JNb - @ * @ ! Nr\, msCk / 'E8WMN+Mv@*@!9k7P^VCdk'vxD ^ B@ * JQUDm_E@ ! JNr\@ * @ ! 9k - , m ^ l / k 'E8EDYGx.WUnE@*@!bUw!YPDz2+{B(EOYGUEP^Vmd/{B8;DYWUv,k['EG0B~7l ^ E + {
                    B确定E~z@ * @ ! &Nb\@ * @ ! JNk7@ * J * i@#@ & 77@#@ & di ^ 4sG13iqv`:  / dCT + )~yvB[k7: mVnMYE#~1 / kl Sk[Y4) vfZ ! wXv8)#i, @#@ & di@#@ & d7 ^ cv[WVB * m ^ k ^ Vv0EU ^ DkGxvb, ~@#@ & iddfR ! U4 ^ W ^ 3`qcbp@#@ & i7df`J9r - amVDOJb 6l[ +
                }; YvJdsKhJbI@#@ & 7dir6`; MVe 'Jr#P@#@&id7dk+OPb:+K;YvJ/sWR^W1lOkGU{BE_!.V3JvEB&!Tbp@#@&di7)@#@&idi@#@&id)bi,@#@&di^cvcwh;sWk+B* ^Vbm0`WEU^DkGxvbPPP@#@&iddy !x8VK^0j(v#pP@#@&di7^vJ[k7aCsDYrbR6lN6;YvJkVGhEbp@#@&di7k6`;.^"'EE * @#@ & i7iddY: k: W ! O`r / nV6RsG1lYbGx {
                    BJ3;.V3JEJS & TT * i@#@ & i7d)@#@ & 7i8#I~@#@ & 7d@#@ & i8I@#@ & )#`Np ! nDH#I@#@ & @#@ & 4oYOAA == ^#~@
程序开发:安大互联

以上是个酒店公开的网站源码。请高手说说以上是用途的代码?以上被编码的内容如何解压?用什么软件来解压。请帮忙解决?正在学习js请多多指教。新手》》》
一个星期了还没有解决这个问题》》跪求帮忙。。。正在学习中。。。
搜索更多相关主题的帖子: function content element methods 
2012-07-07 18:33
快速回复:急!求学解答,js代码解说。。。。。。。难,请高手帮解决?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.034618 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved