使用EasyUI布局时出现混乱瞬间的解决方法

在所有form代码之前加遮罩层 

 

<div id='PageLoadingTip' style="position: absolute; z-index: 1000; top: 0px; left: 0px; width: 100%; height: 100%; background: gray; text-align: center;">  
   <h1 style="top: 48%; position: relative;color:#15428B;">页面加载中···</h1>
</div> 

 

使用 $.parser.onComplete 处理

 

<script type="text/javascript">
    function _PageLoadingTip_Closes() {
        $("#PageLoadingTip").fadeOut("normal", function () {
            $(this).remove();
        });
    }

    var _pageloding_pc;
    $.parser.onComplete = function () {
        if (_pageloding_pc) clearTimeout(_pageloding_pc);
        _pageloding_pc = setTimeout(_PageLoadingTip_Closes, 1000);
    }
</script> 

 

posted @ 2015-05-12 09:42  我知道你的存在  阅读(1561)  评论(1编辑  收藏  举报