小男孩‘自慰网亚洲一区二区,亚洲一级在线播放毛片,亚洲中文字幕av每天更新,黄aⅴ永久免费无码,91成人午夜在线精品,色网站免费在线观看,亚洲欧洲wwwww在线观看

分享

JqueryEasyUI 解決IE下加載時頁面錯亂的問題

 為什么圖書館13 2016-06-25

問題描述:

一直覺得jqueryeasyui在IE下的渲染效果不大好,尤其剛進入頁面時的加載,頁面會出現(xiàn)布局錯亂,雖然是一閃而過,但是給用戶的體驗不好;

可以通過在頁面onload時,增加一個遮罩層,把jqueryeasyui的頁面渲染過程遮住,等頁面加載完后,扔掉遮罩層,顯示頁面;


解決辦法:

[javascript] view plain copy
print?
  1. /* 
  2. 文件說明:頁面加載時Loading JS 
  3. 文件描述:解決IE或FF下,初始化加載時,頁面布局亂掉的問題,參考:http://283433775./blog/720895 
  4. */  
  5. var width = $(window).width();  
  6. var height = $(window).height();  
  7.   
  8. var html = "<div id='loading' style='position:absolute;left:0;width:100%;height:" + height + "px;top:0;background:#E0ECFF;opacity:1;filter:alpha(opacity=100);'>";  
  9. html += "<div style='position:absolute;cursor1:wait;left:" + ((width / 2) - 75) + "px;top:200px;width:150px;height:16px;padding:12px 5px 10px 30px;";  
  10. html += "background:#fff url(" + _basepath + "Scripts/jquery-easyui-1.4/themes/default/images/loading.gif) no-repeat scroll 5px 10px;border:2px solid #ccc;color:#000;'>";  
  11. html += "正在加載,請等待...";  
  12. html += "</div>";  
  13. html += "</div>";  
  14.   
  15. window.onload = function () {  
  16.     var mask = document.getElementById('loading');  
  17.     mask.parentNode.removeChild(mask);  
  18. };  
  19. document.write(html);  
  20.    
把上面的js保存到文件,再引用到頁面即可。

    本站是提供個人知識管理的網(wǎng)絡存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導購買等信息,謹防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊一鍵舉報。
    轉(zhuǎn)藏 分享 獻花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多