首页 > 其他 > 详细

载入锁频

时间:2014-05-09 02:55:37      阅读:342      评论:0      收藏:0      [点我收藏+]
bubuko.com,布布扣

function DyLayer() { function el(id) {
return document.getElementById(id); }; //加載狀態 this.LoadStatus = ""; //css名 this.CssName = "layermask"; //創建遮蓋層 this.render = function(dw, dh) { try { var objDiv = el("sysdiv_wait"); if (objDiv == null) { objDiv = document.createElement("DIV"); objDiv.id = "sysdiv_wait"; objDiv.className = this.CssName; document.body.appendChild(objDiv); var w = 0; var h = 0; var size = qp_shared.getPageSize(); if (dw != null) w = dw; else w = size.width; if (dh != null) h = dh; else h = size.height; objDiv.style.width = w + "px"; objDiv.style.height = h + "px"; var objImg = document.createElement("IMG"); objImg.id = "sysimg_wait"; objImg.src = qp_shared.getURL("images/wait/reloading.gif"); objImg.style.zIndex = 999999; objImg.style.position = "absolute"; objImg.style.left = parseInt((w-24)/2) + "px"; objImg.style.top = parseInt((h-24)/2) + "px"; document.body.appendChild(objImg); } }catch(e){} }; //展現遮蓋層 this.dw_render = function(w, h, resizeToMax, cssName) { this.LoadStatus = "Loading"; //如果需要最大化窗口時 if (resizeToMax) { window.moveTo(0, 0); window.resizeTo(window.screen.availWidth, window.screen.availHeight); }; //如果有自定css if (cssName != null) { this.CssName = cssName; }; this.render(w, h); }; //展現遮蓋層 this.show = function(w, h, resizeToMax, cssName) { this.dw_render(w, h, resizeToMax, cssName); }; this.show2 = function(h, cssName) { this.dw_render(null, h, null, cssName); }; this.show3 = function(cssName) { this.dw_render(null, null, null, cssName); }; //刪除遮蓋層 this.dw_remove = function() { try{ this.LoadStatus = ""; var objDiv = el("sysdiv_wait"); if (objDiv != null) document.body.removeChild(objDiv); var objImg = el("sysimg_wait"); if (objImg != null) document.body.removeChild(objImg); }catch(e){} }; //刪除遮蓋層 this.remove = function() { this.dw_remove(); } }; var oLayer = new DyLayer();

//鎖定界面
function lockingLayer() {
oLayer.dw_render();
};
bubuko.com,布布扣

 

载入锁频,布布扣,bubuko.com

载入锁频

原文:http://www.cnblogs.com/yzenet/p/3716539.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!