码迷,mamicode.com
首页 > Web开发 > 详细

js解决EasyUI页面渲染速度慢问题(Mask遮罩)

时间:2014-09-26 18:36:58      阅读:1903      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   color   io   os   ar   sp   div   

bubuko.com,布布扣
 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); 
View Code

 

js解决EasyUI页面渲染速度慢问题(Mask遮罩)

标签:style   blog   http   color   io   os   ar   sp   div   

原文地址:http://www.cnblogs.com/kkwoo/p/3994694.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!