function coverBody(json){ // alert(jQuery(window.document.body)); var bodyScrollSize=getBodyScrollSize(); $(window.document.body).append($("<iframe id='jq_effect_backGroundIframe' style='z-index:1;filter:mask();overflow:hidden;border:0px;margin:0; padding:0;position:absolute;width:"+bodyScrollSize.width+"px;height:"+bodyScrollSize.height+"px;top:0px;left:0px' scrolling='auto' frameborder='0' ></iframe>"));
var jqCover=$("<div id='jq_effect_backGroundDiv'> <div id='jindu' style='width:368px;height:28px;margin:0 auto;margin-top:165px;'><img src='<%=request.getContextPath()%>/images/jindu.gif' ></div></div>"); var _css = { "background-color":json.color==undefined?"#000":json.color, "position":"absolute","overflow":"hidden", "-moz-opacity": "0.25" , "filter":"alpha(opacity=25)","z-index":"2" ,"opacity":"0.25", "top" : "0px" , "left":"0px","width":bodyScrollSize.width,"height":bodyScrollSize.height }; jqCover.css(_css); //jqCover.appendTo("body"); $(window.document.body).append(jqCover); }
*****************************************************
function getBodyScrollSize() { var bodySL, bodyST, bodySW, bodySH; if(window.pageXOffset) { bodySL=window.pageXOffset; bodySW=window.innerWidth; bodyST=window.pageYOffset; bodySH=window.innerHeight; } else if(document.documentElement) { bodySL=document.documentElement.scrollLeft; bodySW=document.documentElement.scrollWidth; //-10 bodyST=document.documentElement.scrollTop; bodySH=document.documentElement.clientHeight>document.documentElement.scrollHeight?document.documentElement.clientHeight:document.documentElement.scrollHeight; } else if(document.body) { bodySL=document.body.scrollLeft; bodySW=document.body.scrollWidth; bodyST=document.body.scrollTop; bodySH=document.body.clientHeight>document.body.scrollHeight?document.body.clientHeight:document.body.scrollHeight; }
return {"top":bodyST,"left":bodySL,"width":bodySW,"height":bodySH}; } |
|