1. 程式人生 > >loading等待效果

loading等待效果

data easyu filter 分享 css guard url ges selection

效果預覽:這兩個球一直在轉,不能進行其他操作

技術分享

div

<div id="loadingImg" style="height: 100%;width: 100%;background-image: url(‘img/uploading.gif‘);background-position: center; position: fixed;top: 80px;background-repeat: no-repeat;filter:alpha(opacity=85); -moz-opacity:0.85; opacity:0.85;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");
                 }
             });
         }
     });

loading等待效果