js解决EasyUI页面渲染速度慢问题(Mask遮罩)
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
1 /** 2 * 页面加载等待页面 3 * 4 * @author gxjiang 5 * @date 2010/7/24 6 * 7 */ 8 var height = window.screen.height-250; 9 var width = window.screen.width; 10 var leftW = 300; 11 if(width>1200){ 12 leftW = 500; 13 }else if(width>1000){ 14 leftW = 350; 15 }else { 16 leftW = 100; 17 } 18 19 var _html = "<div id='loading' style='position:absolute;left:0;width:100%;height:"+height+"px;top:0;background:#E0ECFF;opacity:0.8;filter:alpha(opacity=80);'>\ 20 <div style='position:absolute; cursor1:wait;left:"+leftW+"px;top:200px;width:auto;height:16px;padding:12px 5px 10px 30px;\ 21 background:#fff url(/wlzl/js/themes/default/images/pagination_loading.gif) no-repeat scroll 5px 10px;border:2px solid #ccc;color:#000;'>\ 22 正在加载,请等待...\ 23 </div></div>"; 24 25 window.onload = function(){ 26 var _mask = document.getElementById('loading'); 27 _mask.parentNode.removeChild(_mask); 28 } 29 30 31 document.write(_html);
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步