欢迎来到天天文库
浏览记录
ID:10126269
大小:37.50 KB
页数:4页
时间:2018-06-11
《制作弹出背景半透明的div屏蔽层》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、
2、F-8">//对浏览器进行判别,判断是否使用的是ie内核varisIe=(document.all)?true:false;//创建渐变的背景层functionshowBackDIV(){varbWidth=parseInt(document.body
3、.scrollWidth);//document.documentElement.scrollWidthvarbHeight=parseInt(document.body.scrollHeight);if(isIe){varback=document.createElement("div");back.id="back";varstyleStr="top:0px;left:0px;position:absolute;background:#666;width:"+bWidth+"px;height:"+bHeight+"px;";styleS
4、tr+=(isIe)?"filter:alpha(opacity=0);":"opacity:0;";back.style.cssText=styleStr;document.body.appendChild(back);showBackground(back,50);}//让背景渐渐变暗functionshowBackground(obj,endInt){if(isIe){obj.filters.alpha.opacity+=1;if(obj.filters.alpha.opacity5、(){showBackground(obj,endInt)},5);}}else{varal=parseFloat(obj.style.opacity);al+=0.01;obj.style.opacity=al;if(al<(endInt/100)){setTimeout(function(){showBackground(obj,endInt)},5);}}}}functionisIE(){if(navigator.userAgent.indexOf("MSIE")>0)//是否是IE浏览器{if(navigator.userAgent.6、indexOf("MSIE6.0")>0)//IE6.0{alert("IE6.0");}elseif(navigator.userAgent.indexOf("MSIE7.0")>0)//IE7.0{alert("IE7.0");}elseif(navigator.userAgent.indexOf("MSIE8.0")>0)//IE8.0{alert("IE8.0");}else{alert("IE其他版本");}}else{alert("非IE浏览器");}}AJAX介绍国内通常的读音为“阿贾克斯”和阿贾克斯足球队读音一样。Web应用的交互如Flickr,Backpack和Google在这方面已经有质的飞跃。这个术语源自描述从基于网页的Web应用到基于数据的应用的转换。在基于数据的应用中,用户需求的数据如联系人列表,可以从独立于实际网页的服务端取得并且可以被动态地写入网页中,给缓慢的Web应用体验着色使之像桌面应用一样。虽然大部分开发人员在过去使用过XMLHttp或者使用Iframe来加载数据,但仅到现在我
5、(){showBackground(obj,endInt)},5);}}else{varal=parseFloat(obj.style.opacity);al+=0.01;obj.style.opacity=al;if(al<(endInt/100)){setTimeout(function(){showBackground(obj,endInt)},5);}}}}functionisIE(){if(navigator.userAgent.indexOf("MSIE")>0)//是否是IE浏览器{if(navigator.userAgent.
6、indexOf("MSIE6.0")>0)//IE6.0{alert("IE6.0");}elseif(navigator.userAgent.indexOf("MSIE7.0")>0)//IE7.0{alert("IE7.0");}elseif(navigator.userAgent.indexOf("MSIE8.0")>0)//IE8.0{alert("IE8.0");}else{alert("IE其他版本");}}else{alert("非IE浏览器");}}
8、们才看到传统的开发人员和公司开始采用这些技术。就像新的编程语言或模型伴随着更多的痛苦,开发人员需要学习新的技巧及如何最好利用这些新技术。AJAX模式许多重要的技术和
此文档下载收益归作者所有