loading等待效果

效果预览:这两个球一直在转,不能进行其他操作

 

div放在最外层

<div id="loadingImg" style="height: 100%;width: 100%;background-image: url('img/uploading.gif');background-position: center; position: fixed;top: 1px;background-repeat: no-repeat;background-color:#FFFFFF;filter:alpha(opacity=80); -moz-opacity:0.80; opacity:0.80;display: none;z-index: 9999 "></div>

 

easyui操作

$.messager.confirm("提示","你确定要删除吗?", function (r) {
         if (r) {
             parent.window.$("#loadingImg").css("display","");//显示上边的div效果
             $.ajax({
                 url : '/xxxx/sg/delSpecialguardInfo',
                 data : {'ids':id},
                 type : 'POST',
                 dataType : 'json',
                 success : function() {
                     parent.window.$("#loadingImg").css("display","none");//成功后隐藏
                     $('#tt').datagrid('reload');
                     clearSelections();
                     $.messager.alert("提示", "操作成功", "success");
                 }
             });
         }
     });

 

posted @ 2017-08-02 16:44  云晴  阅读(210)  评论(0编辑  收藏  举报