• Jquery 遮罩层插件



    (function ($) { $.fn.ShowMask = function (options) { var defaults = { top: 150, left: 200 } var options = $.extend(defaults, options); $("html").append('<div id="ui-mask"></div><div id="ui-mask-div" style="z-index: 99999;position: fixed;top:' + options.top + 'px;left:' + options.left + 'px;"><img src="Images/ui-loading.gif" alt="" /><span>操作正在进行中,请耐心等待......</span></div>') _this_ = $("#ui-mask"); _this_.height($(document).height()) _this_.show(); }; $.fn.HideMask = function (options) { _this_ = $("#ui-mask"); _this_.remove(); }; })(jQuery);
      #ui-mask
            {
                background-color: #666;
                position: absolute;
                z-index: 9999;
                left: 0;
                top: 0;
                display: none;
                width: 100%;
                height: 100%;
                opacity: 0.5;
                filter: alpha(opacity=50);
                -moz-opacity: 0.5;
            }
            #ui-mask-div img
            {
                width: 50px;
                height: 50px;
                float: left;
            }
            #ui-mask-div span
            {
                height: 50px;
                line-height: 50px;
                display: block;
                float: left;
                color: Red;
                font-weight: bold;
                margin-left: 5px;
            }
    function btn_save()
    {
        $(this).ShowMask();
        $.post('url',null,function(d,s){
            $(this).HideMask();
        });
    }
  • 相关阅读:
    POJ2182Lost Cows
    BZOJ4003: [JLOI2015]城池攻占
    POJ1635Subway tree systems
    BZOJ1005: [HNOI2008]明明的烦恼
    POJ1182 NOI2001 食物链
    栈的链式实现
    栈的数组实现
    链表ADT的实现
    #ifndef的用法
    using namespace std
  • 原文地址:https://www.cnblogs.com/chjw8016/p/2754924.html
Copyright © 2020-2023  润新知