js弹出层

<script> var t_DiglogX,t_DiglogY,t_DiglogW,t_DiglogH; function gid(id) { return document.getElementById?document.getElementById(id):null; } function gname(name) { return document.getElementsByTagName?document.getElementsByTagName(name):new Array() } function Browser() { var ua, s, i; this.isIE = false; this.isNS = false; this.isOP = false; this.isSF = false; ua = navigator.userAgent.toLowerCase(); s = "opera"; if ((i = ua.indexOf(s)) >= 0) { this.isOP = true;return; } s = "msie"; if ((i = ua.indexOf(s)) >= 0) { this.isIE = true;return; } s = "netscape6/"; if ((i = ua.indexOf(s)) >= 0) { this.isNS = true;return; } s = "gecko"; if ((i = ua.indexOf(s)) >= 0) { this.isNS = true;return; } s = "safari"; if ((i = ua.indexOf(s)) >= 0) { this.isSF = true;return; } } function DialogLoc() { var dde = document.documentElement; if (window.innerWidth) { var ww = window.innerWidth; var wh = window.innerHeight; var bgX = window.pageXOffset; var bgY = window.pageYOffset; } else { var ww = dde.offsetWidth; var wh = dde.offsetHeight; var bgX = dde.scrollLeft; var bgY = dde.scrollTop; } t_DiglogX = (bgX + ((ww - t_DiglogW)/2)); t_DiglogY = (bgY + ((wh - t_DiglogH)/2)); } function DialogShow(showdata,ow,oh,w,h) { var objDialog = document.getElementById("DialogMove"); if (!objDialog) objDialog = document.createElement("div"); t_DiglogW = ow; t_DiglogH = oh; DialogLoc(); objDialog.id = "DialogMove"; var oS = objDialog.style; oS.display = "block"; oS.top = t_DiglogY + "px"; oS.left = t_DiglogX + "px"; oS.margin = "0px"; oS.padding = "0px"; oS.width = w + "px"; oS.height = h + "px"; oS.position = "absolute"; oS.zIndex = "5"; oS.background = "#FFF"; oS.border = "solid #000 3px"; objDialog.innerHTML = showdata; document.body.appendChild(objDialog); } function DialogHide() { ScreenClean(); var objDialog = document.getElementById("DialogMove"); if (objDialog) objDialog.style.display = "none"; } function ScreenConvert() { var browser = new Browser(); var objScreen = gid("ScreenOver"); if (!objScreen) var objScreen = document.createElement("div"); var oS = objScreen.style; objScreen.id = "ScreenOver"; oS.display = "block"; oS.top = oS.left = oS.margin = oS.padding = "0px"; if (document.body.clientHeight) { var wh = document.body.clientHeight + "px"; } else if (window.innerHeight) { var wh = window.innerHeight + "px"; } else { var wh = "100%"; } oS.width = "100%"; oS.height = wh; oS.position = "absolute"; oS.zIndex = "3"; if ((!browser.isSF) && (!browser.isOP)) { oS.background = "#181818"; } else { oS.background = "#F0F0F0"; } oS.filter = "alpha(opacity=40)"; oS.opacity = 40/100; oS.MozOpacity = 40/100; document.body.appendChild(objScreen); var allselect = gname("select"); for (var i=0; i 正在读取,请稍候...",110,10,124,20); ScreenConvert();DialogShow(showData,400,300,420,320); } </script>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值