div实现遮罩
来源:互联网 发布:mac中强制关闭程序 编辑:程序博客网 时间:2024/04/29 11:29
<div id="testHidden" align="center" style="display:none" >
<IMG id=waiting_img src="img/waiting.gif" align=middle border=0 />
正在处理,请稍等...
</div>
//产生遮罩
nstc.disableBodyArea = function(win){
if(!win){
win = window;
doc = document;
}else{
doc = win.document;
}
if(!doc.all) return false;//For firefox etc.
win.topCoverDiv=doc.createElement("<div style='z-index:100;position:absolute;top:expression(this.offsetParent.scrollTop);left:expression(this.offsetParent.scrollLeft);width:expression(document.body.offsetWidth);height:expression(document.body.offsetHeight);filter:alpha(opacity=20);background-color:#888888;' oncontextmenu='return false;'>");
win.topCoverDiv.innerHTML=" "
doc.body.appendChild(topCoverDiv);
var allSelects=doc.getElementsByTagName("select");
for(var i=0;i<allSelects.length;i++) {
//allSelects[i].style.visibility="hidden";
allSelects[i].style.disabled=true;
allSelects[i].style.backgroundColor="#EEEEEE";
}
}
var testHidden=document.getElementById("testHidden");
testHidden.style.visibility="visible";
testHidden.style.display ="block";
以上代码便能产生遮罩,页面返回后,遮罩自动消失~~
- div实现遮罩
- 用div层来实现页面半透明遮罩效果
- jquery实现div遮罩效果,并获取鼠标位置。
- 用div层来实现页面半透明遮罩效果
- 用div层来实现页面半透明遮罩效果
- 用 js 实现“div的遮罩”效果
- div+css实现图片底部透明遮罩文字标题
- 实现 div 覆盖 div
- div遮罩效果
- 半透明遮罩效果 DIV
- div半透明遮罩效果
- CSS DIV遮罩操作
- DIV实现弹出窗口
- div+javascript实现popup
- 实现DIV居中 css
- JS实现DIV拖动
- DIV图层圆边圆角的实现
- DIV 首部固定实现
- 30+ Best Html5 Website Design Inspiration
- 拔河选帅 拉加德胜券在握
- iPhone开发笔记(1)MPMoviePlayerController的用法和播放时只有声音没有图像的解决办法
- inode,vnode,file
- 各排序算法实现
- div实现遮罩
- Qt、DirectFB、2D图像加速器那点事儿
- 基于Android的WiFi对讲机项目简介
- SQL 2005 行列转换 实例(函数PIVOT&UNPIVOT)
- 【转】Guidelines to port webkit
- ListBox右键选中,打开ContextMenuStrip
- asp.net MVC3 Get Json
- Comparison of BI Software Licensing Cost
- Linux下利用crontab执行任务