制作弹出背景半透明的DIV屏蔽层//对浏览器进行判别,判断是否使用的是ie内核varisIe=(document
true:false;//创建渐变的背景层functionshowBackDIV(){varbWidth=parseInt(document
scrollWidth);//document
documentElement
scrollWidthvarbHeight=parseInt(document
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;";styleStr+=(isIe)
"filter:alpha(opacity=0);":"opacity:0;";back
cssText=styleStr;document
appendChild(back);showBackground(back,50);}//让背景渐渐变暗functionshowBackground(obj,endInt){if(isIe){obj
filters
opacity+=1;if(obj
filters
opacity0)//IE6
0{alert("IE6
0");}elseif(navigator
userAgent
indexOf("MSIE7
0")>0)//IE7
0{alert("IE7
0");}elseif(navigator
userAgent
indexOf("MSIE8