js弹出图层锁定页面 |
您所在的位置:网站首页 › id图层锁定 › js弹出图层锁定页面 |
方法1 menu.style.display=""?'none':'none'; //去除蒙版,达到解锁document.cookie="lock=no"; //设置cookiereturn false;} function cklock() //对输入的密码进行验证{ if (lockpwd.value==getcookie('lockpwd')) //验证密码与cookie密码{ unlock(lockform);}else{alert("密码错误,请重新输入!");lockpwd.value="";lockpwd.focus();return false;}}function getcookie(name) //获取cookies,用来验证输入的密码{ var aCookie = document.cookie.split("; "); //取得所有cookies,并放置到数组中:[cookie名=值] for (var i=0; i < aCookie.length; i++) //遍历所有cookies{ aCrumb = aCookie[i].split("="); //将cookie名和值分开 if (name==aCrumb[0]) //验证cookie名 { return aCrumb[1]; } //返回cookie值}}-->position: absolute;width:expression(this.parentNode.scrollWidth);top:expression(this.parentNode.scrollTop); left=0; height:100%;right:0; bottom:0;}#lockform { z-index:1}#locklayer{ z-index:1;background-color:#AAA;filter:alpha(opacity=50);}#locktab{position: absolute;top:250px;left:expression(this.parentNode.scrollWidth/2-100);background-color:#FDFEFF; z-index:2;width:200px;height:60px;border-style: solid; border-width: 1px;border-color:green;color:red;}#lockck{border:0;background:fff;color:red;}--> 锁定
方法2 function _debug(msg) { alert(msg); document.getElementById('search').focus(); } Dolphin Document abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc window.alert = function(txt) { //document.write(txt); var shield = document.createElement("DIV"); shield.style.position = "absolute"; shield.style.left = "0px"; // shield.id = "shield"; shield.style.top = "0px"; shield.style.width = "100%"; shield.style.height = document.body.clientHeight+"px"; shield.style.background = "#333"; shield.style.textAlign = "center"; // shield.style.lineHeight = document.body.clientHeight+"px"; shield.style.zIndex = "1"; shield.style.filter = "alpha(opacity=0)"; var alertFram = document.createElement("DIV"); alertFram.style.position = "absolute"; alertFram.style.left = "50%"; alertFram.style.top = "50%"; alertFram.style.marginLeft = "-225px"; alertFram.style.marginTop = "-75px"; alertFram.style.width = "450px"; alertFram.style.height = "150px"; alertFram.style.background = "#ccc"; alertFram.style.textAlign = "center"; alertFram.style.lineHeight = "150px"; alertFram.style.zIndex = "2"; strHtml = "/n"; strHtml += " [系统提示]/n"; strHtml += " "+txt+"/n"; strHtml += " /n"; strHtml += "/n"; alertFram.innerHTML = strHtml; document.body.appendChild(alertFram); document.body.appendChild(shield); var c = 0; this.doAlpha = function(){ if (c++ > 10){clearInterval(ad);return 0;} shield.style.filter = "alpha(opacity="+c+");"; } var ad = setInterval("doAlpha()",20); this.doOk = function(){ alertFram.style.display = "none"; shield.style.display = "none"; } } |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |