如何用一个层把整个页面都盖住 在一个事件执行的同时如何用一个层把整个页面都盖住实现页面不能操作然后等该方法执行完了之后,在恢复正常 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 position: absolute; width: 100%; height: 100%; z-index: 99; <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><meta name="author" content="Chomo" /><link rel="start" href="http://www.14px.com" title="Home" /><title>全屏屏蔽、自动居中的lightBox</title><style type="text/css">* { margin:0; padding:0; }html,body { height:100%; overflow:hidden; font:12px/1.5 simsun;}.myPage { line-height:3; overflow:auto; width:100%; height:100%;}.lightBox,.popupCover,.popupIframe,.popupComponent { position:absolute; left:0; top:0; width:100%;height:100%;}.popupComponent { z-index:2; display:none;}.popupIframe { display:none; _display:block; _filter:alpha(opacity=0);}.popupCover { background:#000; opacity:0.7; *filter:alpha(opacity=70);}.lightBox { text-align:center; overflow:auto;}.lightBoxContent { display:inline-block; *display:inline; zoom:1;width:300px; padding:10px; background:#fff; border:5px solid #00b4ff;vertical-align:middle;}.lightBoxMaxHeight { display:inline-block; vertical-align:middle;height:100%; *height:99.5%; width:1px; overflow:hidden;margin-left:-1px;}.lightBoxWrapper { display:inline-block; *display:inline; zoom:1;text-align:left;}.lightBoxClose { color:#f00;}.lightBoxSubmit { margin-top:10px; padding-top:5px; border-top:1pxsolid #ccc;}.lightBoxSubmit input { font-size:12px; padding:0 10px;overflow:visible; margin:0 5px;}</style></head><body><div class="popupComponent" id="lightBox"> <iframe class="popupIframe"></iframe> <div class="popupCover"></div> <div class="lightBox"> <span class="lightBoxMaxHeight"></span> <div class="lightBoxContent"> <div class="lightBoxWrapper"> 当提示小于一行时文字居中<br /> </div> <div class="lightBoxSubmit"> <input type="button" value="确定" onclick="hideLayer('lightBox')" /> <input type="button" value="取消" onclick="hideLayer('lightBox')" /> </div> </div> </div></div><div class="popupComponent" id="lightBox2"> <iframe class="popupIframe"></iframe> <div class="popupCover"></div> <div class="lightBox"> <div class="lightBoxContent"> <div class="lightBoxWrapper"> 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br /> 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br /> 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br /> 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br /> 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br /> 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br /> 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br /> 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br /> 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br /> 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br /> 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br /> 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br /> 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br /> 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br /> 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br /> 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br /> 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br /> 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br /> 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br /> 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br /> 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br /> 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br /> 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br /> </div> <div class="lightBoxSubmit"> <input type="button" value="确定" onclick="hideLayer('lightBox2')" /> <input type="button" value="取消" onclick="hideLayer('lightBox2')" /> </div> </div> <span class="lightBoxMaxHeight"></span> </div></div><div class="myPage"> 假装很丰富的内容<br /> 假装很丰富的内容<br /> 假装很丰富的内容<br /> 假装很丰富的内容<br /> <div style="text-align:center;"> <input type="button" value="位于第一屏的按钮" onclick="showLayer('lightBox')" /> </div> 假装很丰富的内容<br /> 假装很丰富的内容<br /> 假装很丰富的内容<br /> 假装很丰富的内容<br /> <select> <option>一个用于测试IE6中是否能覆盖住的select</option> </select> <br /> 假装很丰富的内容<br /> 假装很丰富的内容<br /> 假装很丰富的内容<br /> 假装很丰富的内容<br /> 假装很丰富的内容<br /> 假装很丰富的内容<br /> 假装很丰富的内容<br /> 假装很丰富的内容<br /> 假装很丰富的内容<br /> 假装很丰富的内容<br /> 假装很丰富的内容<br /> 假装很丰富的内容<br /> <select> <option>又一个用于测试IE6中是否能覆盖住的select</option> </select> <br /> 假装很丰富的内容<br /> 假装很丰富的内容<br /> 假装很丰富的内容<br /> 假装很丰富的内容<br /> <div style="text-align:center;"> <input type="button" value="位于第二屏中的按钮"onclick="showLayer('lightBox')" /> <input type="button"value="当内容已经超过了一屏的高度" onclick="showLayer('lightBox2')"/> </div> 假装很丰富的内容<br /> 假装很丰富的内容<br /> 假装很丰富的内容<br /> 假装很丰富的内容<br /> 假装很丰富的内容<br /> 假装很丰富的内容<br /> 假装很丰富的内容<br /> 假装很丰富的内容<br /> 假装很丰富的内容<br /> 假装很丰富的内容<br /> 假装很丰富的内容<br /> 假装很丰富的内容<br /></div><script>function showLayer(id) { document.getElementById(id).style.display ="block";}function hideLayer(id) { document.getElementById(id).style.display ="none";}</script><!--存在的两个细节性问题:1. 大家可以看到完整demo中并未出现font-size:0;,而在垂直居中法中却出现了。因为font-size:0在完整demo中,将使firefox3.5中读者完整阅读时lightBox的鼠标滚轮失效,原因不详,这一点大家可以作情处理。2. maxHeight这东西只能放在lightBoxContent的后面,因为在opera9.6中会出现bug--></body></html>弹出一个层,里面的正中间有个层作显示的。。自适应居中~全屏屏蔽 这用Ajax 来实现比较合理弹出层:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title></title><STYLE>#login{ position: relative; display: none; top: 20px; left: 30px; background-color: #ffffff; text-align: center; border: solid 1px; padding: 10px; z-index: 1;} </STYLE><script type="text/javascript">var W = screen.width;//取得屏幕分辨率宽度var H = screen.height;//取得屏幕分辨率高度function M(id){return document.getElementById(id);//用M()方法代替document.getElementById(id)}function MC(t){return document.createElement(t);//用MC()方法代替document.createElement(t)};//判断浏览器是否为IEfunction isIE(){ return (document.all && window.ActiveXObject && !window.opera) ? true : false;}//取得页面的高宽function getBodySize(){var bodySize = [];with(document.documentElement) {bodySize[0] = (scrollWidth>clientWidth)?scrollWidth:clientWidth;//如果滚动条的宽度大于页面的宽度,取得滚动条的宽度,否则取页面宽度bodySize[1] = (scrollHeight>clientHeight)?scrollHeight:clientHeight;//如果滚动条的高度大于页面的高度,取得滚动条的高度,否则取高度}return bodySize;}//创建遮盖层function popCoverDiv(){if (M("cover_div")) {//如果存在遮盖层,则让其显示M("cover_div").style.display = 'block';} else {//否则创建遮盖层var coverDiv = MC('div');document.body.appendChild(coverDiv);coverDiv.id = 'cover_div';with(coverDiv.style) { position = 'absolute'; background = '#CCCCCC'; left = '0px'; top = '0px'; var bodySize = getBodySize(); width = bodySize[0] + 'px' height = bodySize[1] + 'px'; zIndex = 0; if (isIE()) { filter = "Alpha(Opacity=60)";//IE逆境 } else { opacity = 0.6; }}}}//让登陆层显示为块function showLogin(){var login=M("login"); login.style.display = "block";}//设置DIV层的样式function change(){ var login = M("login"); login.style.position = "absolute"; login.style.border = "1px solid #CCCCCC"; login.style.background ="#F6F6F6"; var i=0; var bodySize = getBodySize(); login.style.left = (bodySize[0]-i*i*4)/2+"px"; login.style.top = (bodySize[1]/2-100-i*i)+"px"; login.style.width = i*i*4 + "px"; login.style.height = i*i*1.5 + "px"; popChange(i);}//让DIV层大小循环增大function popChange(i){ var login = M("login"); var bodySize = getBodySize(); login.style.left = (bodySize[0]-i*i*4)/2+"px"; login.style.top = (bodySize[1]/2-100-i*i)+"px"; login.style.width = i*i*4 + "px"; login.style.height = i*i*1.5+ "px"; if(i<=10){ i++; setTimeout("popChange("+i+")",10);//设置超时10毫秒 }}//打开DIV层function open(){change();showLogin();popCoverDiv()void(0);//不进行任何操作,如:<a href="#">aaa</a>setTimeout("close()",10000);//设置10秒自动关闭}//关闭DIV层function close(){ M('login').style.display = 'none'; M("cover_div").style.display = 'none';void(0);}</script></head><body><a href="javascript:open();">导出</a><div id="login"><div id="panel"><br><br><br><br><center><font color='green'>正在导出文件,请稍后...</font></center></div></div></body></html> document.getElementById("backlayer").style.width = document.body.clientWidth + "px";document.getElementById("backlayer").style.height = document.body.clientHeight + "px";#backLayer{ position: absolute; background: #333; filter: alpha(opacity=60); opacity: 0.6; left: 0; top: 0; display: block;} 请问7楼:backlayer是什么东东?在哪定义的? position: absolute; width: 100%; height: 100%; z-index: 99; 这个是div的style backlayer 是什么? 汗 LZ 没学过html吧? #backLayer{ position: absolute; background: #333; filter: alpha(opacity=60); opacity: 0.6; left: 0; top: 0; display: block;} 继续请教cookies在不同页面之间失效的问题。 使用微软API如何在网页中实现自动缩放标记点 gridview控件显示问题 Urlrewriter得问题 物价涨了,花钱更小心了。 请问如何遍历在另一个框架页中的treeview急! 网站制作的问题!分不够再加 如何动态把按钮列(编辑列)添加到datagrid最右边啊!(急急急!!!) 各位能否说说各自参与的项目中缓存设计方案? 在线等候? Repeater,救命啊! window 身份 无法登录server2005~~~
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="author" content="Chomo" />
<link rel="start" href="http://www.14px.com" title="Home" />
<title>全屏屏蔽、自动居中的lightBox</title>
<style type="text/css">
* { margin:0; padding:0; }
html,body { height:100%; overflow:hidden; font:12px/1.5 simsun;}
.myPage { line-height:3; overflow:auto; width:100%; height:100%;}
.lightBox,
.popupCover,
.popupIframe,
.popupComponent { position:absolute; left:0; top:0; width:100%;
height:100%;}
.popupComponent { z-index:2; display:none;}
.popupIframe { display:none; _display:block; _filter:alpha(opacity=0);}
.popupCover { background:#000; opacity:0.7; *filter:alpha(opacity=70);}
.lightBox { text-align:center; overflow:auto;}
.lightBoxContent { display:inline-block; *display:inline; zoom:1;
width:300px; padding:10px; background:#fff; border:5px solid #00b4ff;
vertical-align:middle;}
.lightBoxMaxHeight { display:inline-block; vertical-align:middle;
height:100%; *height:99.5%; width:1px; overflow:hidden;
margin-left:-1px;}
.lightBoxWrapper { display:inline-block; *display:inline; zoom:1;
text-align:left;}
.lightBoxClose { color:#f00;}
.lightBoxSubmit { margin-top:10px; padding-top:5px; border-top:1px
solid #ccc;}
.lightBoxSubmit input { font-size:12px; padding:0 10px;
overflow:visible; margin:0 5px;}
</style>
</head>
<body>
<div class="popupComponent" id="lightBox">
<iframe class="popupIframe"></iframe>
<div class="popupCover"></div>
<div class="lightBox"> <span class="lightBoxMaxHeight"></span>
<div class="lightBoxContent">
<div class="lightBoxWrapper"> 当提示小于一行时文字居中<br />
</div>
<div class="lightBoxSubmit">
<input type="button" value="确定" onclick="hideLayer('lightBox')" />
<input type="button" value="取消" onclick="hideLayer('lightBox')" />
</div>
</div>
</div>
</div>
<div class="popupComponent" id="lightBox2">
<iframe class="popupIframe"></iframe>
<div class="popupCover"></div>
<div class="lightBox">
<div class="lightBoxContent">
<div class="lightBoxWrapper"> 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />
当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />
当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />
当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />
当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />
当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />
当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />
当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />
当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />
当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />
当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />
当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />
当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />
当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />
当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />
当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />
当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />
当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />
当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />
当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />
当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />
当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />
当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />
</div>
<div class="lightBoxSubmit">
<input type="button" value="确定" onclick="hideLayer('lightBox2')" />
<input type="button" value="取消" onclick="hideLayer('lightBox2')" />
</div>
</div>
<span class="lightBoxMaxHeight"></span> </div>
</div>
<div class="myPage"> 假装很丰富的内容<br />
假装很丰富的内容<br />
假装很丰富的内容<br />
假装很丰富的内容<br />
<div style="text-align:center;">
<input type="button" value="位于第一屏的按钮" onclick="showLayer('lightBox')" />
</div>
假装很丰富的内容<br />
假装很丰富的内容<br />
假装很丰富的内容<br />
假装很丰富的内容<br />
<select>
<option>一个用于测试IE6中是否能覆盖住的select</option>
</select>
<br />
假装很丰富的内容<br />
假装很丰富的内容<br />
假装很丰富的内容<br />
假装很丰富的内容<br />
假装很丰富的内容<br />
假装很丰富的内容<br />
假装很丰富的内容<br />
假装很丰富的内容<br />
假装很丰富的内容<br />
假装很丰富的内容<br />
假装很丰富的内容<br />
假装很丰富的内容<br />
<select>
<option>又一个用于测试IE6中是否能覆盖住的select</option>
</select>
<br />
假装很丰富的内容<br />
假装很丰富的内容<br />
假装很丰富的内容<br />
假装很丰富的内容<br />
<div style="text-align:center;">
<input type="button" value="位于第二屏中的按钮"onclick="showLayer('lightBox')" />
<input type="button"value="当内容已经超过了一屏的高度" onclick="showLayer('lightBox2')"/>
</div>
假装很丰富的内容<br />
假装很丰富的内容<br />
假装很丰富的内容<br />
假装很丰富的内容<br />
假装很丰富的内容<br />
假装很丰富的内容<br />
假装很丰富的内容<br />
假装很丰富的内容<br />
假装很丰富的内容<br />
假装很丰富的内容<br />
假装很丰富的内容<br />
假装很丰富的内容<br />
</div>
<script>
function showLayer(id) {
document.getElementById(id).style.display ="block";
}
function hideLayer(id) {
document.getElementById(id).style.display ="none";
}
</script>
<!--存在的两个细节性问题:
1. 大家可以看到完整demo中并未出现font-size:0;,而在垂直居中法中却出现了。
因为font-size:0在完整demo中,将使firefox3.5中读者完整阅读时lightBox的鼠标滚轮失效,原因不详,这一点大家可以作情处理。
2. maxHeight这东西只能放在lightBoxContent的后面,因为在opera9.6中会出现bug-->
</body>
</html>
弹出一个层,里面的正中间有个层作显示的。。自适应居中~全屏屏蔽
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
<STYLE>
#login{
position: relative;
display: none;
top: 20px;
left: 30px;
background-color: #ffffff;
text-align: center;
border: solid 1px;
padding: 10px;
z-index: 1;
}
</STYLE>
<script type="text/javascript">
var W = screen.width;//取得屏幕分辨率宽度
var H = screen.height;//取得屏幕分辨率高度function M(id){
return document.getElementById(id);//用M()方法代替document.getElementById(id)
}
function MC(t){
return document.createElement(t);//用MC()方法代替document.createElement(t)
};
//判断浏览器是否为IE
function isIE(){
return (document.all && window.ActiveXObject && !window.opera) ? true : false;
}
//取得页面的高宽
function getBodySize(){
var bodySize = [];
with(document.documentElement) {
bodySize[0] = (scrollWidth>clientWidth)?scrollWidth:clientWidth;//如果滚动条的宽度大于页面的宽度,取得滚动条的宽度,否则取页面宽度
bodySize[1] = (scrollHeight>clientHeight)?scrollHeight:clientHeight;//如果滚动条的高度大于页面的高度,取得滚动条的高度,否则取高度
}
return bodySize;
}
//创建遮盖层
function popCoverDiv(){
if (M("cover_div")) {
//如果存在遮盖层,则让其显示
M("cover_div").style.display = 'block';
} else {
//否则创建遮盖层
var coverDiv = MC('div');
document.body.appendChild(coverDiv);
coverDiv.id = 'cover_div';
with(coverDiv.style) {
position = 'absolute';
background = '#CCCCCC';
left = '0px';
top = '0px';
var bodySize = getBodySize();
width = bodySize[0] + 'px'
height = bodySize[1] + 'px';
zIndex = 0;
if (isIE()) {
filter = "Alpha(Opacity=60)";//IE逆境
} else {
opacity = 0.6;
}
}
}
}
//让登陆层显示为块
function showLogin()
{
var login=M("login");
login.style.display = "block";
}//设置DIV层的样式
function change(){
var login = M("login");
login.style.position = "absolute";
login.style.border = "1px solid #CCCCCC";
login.style.background ="#F6F6F6";
var i=0;
var bodySize = getBodySize();
login.style.left = (bodySize[0]-i*i*4)/2+"px";
login.style.top = (bodySize[1]/2-100-i*i)+"px";
login.style.width = i*i*4 + "px";
login.style.height = i*i*1.5 + "px";
popChange(i);
}
//让DIV层大小循环增大
function popChange(i){
var login = M("login");
var bodySize = getBodySize();
login.style.left = (bodySize[0]-i*i*4)/2+"px";
login.style.top = (bodySize[1]/2-100-i*i)+"px";
login.style.width = i*i*4 + "px";
login.style.height = i*i*1.5+ "px";
if(i<=10){
i++;
setTimeout("popChange("+i+")",10);//设置超时10毫秒
}
}
//打开DIV层
function open()
{
change();
showLogin();
popCoverDiv()
void(0);//不进行任何操作,如:<a href="#">aaa</a>setTimeout("close()",10000);//设置10秒自动关闭
}
//关闭DIV层
function close(){
M('login').style.display = 'none';
M("cover_div").style.display = 'none';
void(0);
}</script>
</head>
<body>
<a href="javascript:open();">导出</a>
<div id="login">
<div id="panel">
<br><br><br><br>
<center><font color='green'>正在导出文件,请稍后...</font></center>
</div>
</div>
</body>
</html>
document.getElementById("backlayer").style.height = document.body.clientHeight + "px";#backLayer
{
position: absolute;
background: #333;
filter: alpha(opacity=60);
opacity: 0.6;
left: 0;
top: 0;
display: block;
}
backlayer 是什么? 汗 LZ 没学过html吧?
{
position: absolute;
background: #333;
filter: alpha(opacity=60);
opacity: 0.6;
left: 0;
top: 0;
display: block;
}