仿百度空间右下角弹窗代码

1周前 (01-08 20:44)阅读回复0
大陆
大陆
  • 管理员
  • 发消息
  • 注册排名1
  • 经验值5669
  • 级别管理员
  • 主题1133
  • 回复2
楼主

百度空间右下角弹窗广告代码,很不错的一个右下角弹窗特效,带缩小和关闭按钮,基本兼容所有浏览器,可以自己设置cookie。

<html>
<head>
<meta http-equiv=content-type content="text/html; charset=uft-8">
<meta name="keywords" content="武鸣人网站,武鸣信息网,武鸣本地网,武鸣信息资源平台,减肥,健身,励志,励志语录,js特效,网页特效,www.wuming.ren">
<meta name="description" content="欢迎来到武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码。">
<title>百度空间右下角窗口代码,武鸣人欢迎您。</title>
</head>
<body>
<a href="https://www.wuming.ren">武鸣人</a>,各种信息资源免费发布,分享励志语录经典短句,减肥健身常识,各种js特效代码。网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)<hr>
<!--欢迎来到武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码。-->
<script type="text/javascript" src="https://www.wuming.ren/ad/tc.js"></script>
<script type="text/javascript" src="https://www.wuming.ren/ad/a.js"></script>
<script language="javascript">
var ua=navigator.userAgent;var $IE=(navigator.appName=="Microsoft Internet Explorer");var $IE5=$IE&&(ua.indexOf("MSIE 5")!=-1);var $IE5_0=$IE&&(ua.indexOf("MSIE 5.0")!=-1);var $Gecko=ua.indexOf("Gecko")!=-1;var $Safari=ua.indexOf("Safari")!=-1;var $Opera=ua.indexOf("Opera")!=-1;var $Mac=ua.indexOf("Mac")!=-1;var $NS7=ua.indexOf("Netscape/7")!=-1;var $NS71=ua.indexOf("Netscape/7.1")!=-1;if($Opera){$IE=true;$Gecko=false;$Safari=false}if($IE5){$IE=true;$Gecko=false;$Safari=false}function $_t(B,A,E){var C=B.getElementsByTagName(A);for(var D=0;D<C.length;D++){if(C[D].id==E){return C[D]}}return null}function _(A){var F=arguments;var G=0;if(typeof (A)=="string"){A=document}else{G=1}for(var D=G;D<F.length;D++){var E=A.getElementsByTagName("*");var C=false;for(var B=0;B<E.length;B++){if(E[B].id==F[D]){A=E[B];C=true;break}}if(!C){return null}}return A}function $dele(o,fn,rv){var r=function(){var s=arguments.callee;var args=[];for(var i=0;i<s.length;i++){args[i]=s[i]}var argStr=args.join(",");if(argStr.length>0){argStr=","+argStr}var callStr="s.thiz[s.fn]("+argStr+")";var v=eval(callStr);if(s.rv!=null){return s.rv}else{return v}};r.thiz=o;r.fn=fn;r.rv=rv;return r}function $ge(A){if(A!=null){return A}if($IE){return window.event}else{return A}}function $gte(B,A){if(!B.getElementById){B=B.ownerDocument}if($IE){return A!=null?A:B.parentWindow.event}else{return A;throw new Error("this method can only execute in IE")}}function $addEL(F,E,D,C){if($IE){if(F["$__listener_"+E]==null){var B=function(J){var I=arguments.callee;var G=I.fList;J=$ge(J);for(var H=0;H<G.length;H++){G[H](J)}};B.fList=[];F["$__listener_"+E]=B;F["on"+E]=F["$__listener_"+E]}var A=F["$__listener_"+E].fList;A[A.length]=D}else{F.addEventListener(E,D,C)}}function $cancelEvent(A){if($IE){A.returnValue=false;A.cancelBubble=true}else{A.preventDefault()}}function $cpAttr(D,C){for(var A in C){var B=C[A];D[A]=B}return D}function $getValue(A,B){return A==null?B:A}var $gv=$getValue;var $dom={parseInt:function(A){if(A==null||A==""||typeof (A)=="undefined"){return 0}return parseInt(A)},getClientSize:function(G){if($IE){var D={x:G.clientLeft,y:G.clientTop};D.l=D.x;D.t=D.y;D.r=G.clientRight;D.b=G.clientBottom;D.w=G.clientWidth;D.h=G.clientHeight;return D}else{var C=G.style;if(C.borderLeftWidth.length==0||C.borderTopWidth.length==0||C.borderRightWidth.length==0||C.borderBottomWidth.length==0){var B=G.offsetWidth;C.borderLeftWidth="0px";B-=G.offsetWidth;var E=G.offsetWidth;C.borderRightWidth="0px";E-=G.offsetWidth;var F=G.offsetHeight;C.borderTopWidth="0px";F-=G.offsetHeight;var A=G.offsetHeight;C.borderBottomWidth="0px";A-=G.offsetHeight;C.borderLeftWidth=B+"px";C.borderTopWidth=F+"px";C.borderRightWidth=E+"px";C.borderBottomWidth=A+"px";var D={l:B,r:E,t:F,b:A,x:B,y:F};return D}else{var D={x:this.parseInt(G.style.borderLeftWidth),y:this.parseInt(G.style.borderTopWidth),r:this.parseInt(G.style.borderRightWidth),b:this.parseInt(G.style.borderBottomWidth)};D.l=D.x;D.t=D.y;return D}}},getSize:function(D,B){var C={x:D.offsetWidth!=null?D.offsetWidth:0,y:D.offsetHeight!=null?D.offsetHeight:0};if(B){var A=this.getMargin(D);C.x+=A.l+A.r;C.y+=A.t+A.b}return C},setSize:function(E,B,H,F){if($IE){if(F){var A=this.getMargin(E);B-=A.l+A.r;H-=A.t+A.b}E.style.width=B;E.style.height=H}else{var G=this.getClientSize(E);var D=G.l+G.r;var C=G.t+G.b;E.style.width=B-D+"px";E.style.height=H-C+"px"}},getPosition:function(B,C){var D;D={x:B.offsetLeft,y:B.offsetTop};if(C){var A=this.getMargin(B);D.x-=A.l;D.y-=A.t}return D},setPosition:function(B,A,D,C){if(C){}B.style.left=A+"px";B.style.top=D+"px"},setAlpha:function(B,A){return ;B.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+A*100+");";B.style.opacity=A;B.style.MozOpacity=A}};var $motion={smooth:function(B,C,A){if(A>1){A=1}return(C-B)*A+B}};function PopUp(D,A){this.id=D;var C=this.config=A;C.width=$gv(C.width,300);C.height=$gv(C.height,200);C.bottom=$gv(C.bottom,0);C.right=$gv(C.right,20);C.display=$gv(C.display,true);C.contentUrl=$gv(C.contentUrl,"");C.motionFunc=$gv(C.motionFunc,$motion.smooth);C.position={x:0,y:0};var B=C.time;B.slideIn=$gv(B.slideIn,10);B.hold=$gv(B.hold,10);B.slideOut=$gv(B.slideOut,10);B.slideIn*=1000;B.hold*=1000;B.slideOut*=1000;this.container=document.body;this.popup=null;this.content=null;this.switchButton=null;this.moveTargetPosition=0;this.startMoveTime=null;this.startPosition=null;this.status=PopUp.STOP;this.intervalHandle=null;this.mm="max";this.imgMin1="/img/20250108_www_wuming_ren_1.gif";this.imgMin2="/img/20250108_www_wuming_ren_2.gif";this.imgMax="/img/20250108_www_wuming_ren_3.gif"}PopUp.STOP=0;PopUp.MOVE_DOWN=1;PopUp.MOVE_UP=2;PopUp.SWITCH_TO_MIN=PopUp.MOVE_DOWN|4;PopUp.SWITCH_TO_MAX=PopUp.MOVE_UP|8;var __o={create:function(){var G=document;var H=this.config;var F=this.popup=G.createElement("div");this.container.appendChild(F);F.id=this.id;F.style.cssText="position:absolute;z-index:65531 !important;overflow:hidden;border:0px solid #f00;";$dom.setSize(F,H.width,H.height);var D=this.content=G.createElement("div");F.appendChild(D);D.id=this.id+"_content";D.style.cssText="position:absolute;z-index:1;overflow:hidden;";$dom.setSize(D,H.width,H.height);$dom.setPosition(D,0,0);H.position.y=H.height;this.onresize();var C="<a id='closeButton' href='#'></a><a id='switchButton' href='#'></a><div id='ifm_div' style='height:245px;'><iframe id='"+this.id+"_content_iframe' src="+H.contentUrl+" frameborder=0 scrolling=no width='100%' height='100%' allowTransparency='true'></iframe></div>";D.innerHTML=C;var E=this.switchButton=$_t(D,"a","switchButton");E.style.cssText='position:absolute;z-index:2;font-size:0px;line-height:0px;left:250px;top:6px;width:13px;height:13px;background-image:url("/img/20250108_www_wuming_ren_1.gif");';$addEL(E,"click",$dele(this,"switchMode"),true);$addEL(E,"click",$cancelEvent,true);var B=$_t(D,"a","closeButton");B.style.cssText='position:absolute;z-index:2;font-size:0px;line-height:0px;left:270px;top:6px;width:13px;height:13px;background-image:url("/img/20250108_www_wuming_ren_3.gif");';$addEL(B,"mouseover",function(I){$dom.setAlpha(this,0.4)},true);$addEL(B,"mouseout",function(I){$dom.setAlpha(this,1)},true);$addEL(B,"click",$dele(this,"hide"),true);$addEL(B,"click",$cancelEvent,true);var A=$IE?document.body:document.documentElement;$addEL(document.body,"resize",$dele(this,"onresize"),true);this.__hackTimer=window.setInterval("__popup.onresize()",50);$addEL(A,"scroll",$dele(this,"onresize"),true);this.onresize()},show:function(){if(!this.config.display){return }this.moveTargetPosition=0;this.status=PopUp.MOVE_UP;this.startMove()},hide:function(){this.status=PopUp.MOVE_DOWN;this.stopMove();if(typeof (quitAdSrc)!="undefined"&&quitAdSrc!=null&&quitAdSrc!=""&&this.mm=="max"){$_t(this.content,"a","closeButton").style.visibility="hidden";$_t(this.content,"a","switchButton").style.visibility="hidden";$_t(this.content,"div","ifm_div").style.visibility="hidden";var B=$_t(this.content,"div","closeswf_div");B.style.visibility="visible";var A=this.popup;setTimeout(function(){A.innerHTML=""},3500)}else{this.moveTargetPosition=this.config.height;this.status=PopUp.MOVE_DOWN;this.startMove()}},minimize:function(){this.mm="min";this.moveTargetPosition=this.config.height-28;this.status=PopUp.SWITCH_TO_MIN;this.startMove();var B=this.switchButton.style;var A=B.backgroundImage;if(A.indexOf(this.imgMin1)>-1){A=A.replace(this.imgMin1,this.imgMin2);B.backgroundImage=A}},maximize:function(){if(!this.config.display){return }this.mm="max";this.moveTargetPosition=0;this.status=PopUp.SWITCH_TO_MAX;this.startMove();var B=this.switchButton.style;var A=B.backgroundImage;if(A.indexOf(this.imgMin2)>-1){A=A.replace(this.imgMin2,this.imgMin1);B.backgroundImage=A}},delayHide:function(){window.setTimeout("__popup.hide()",this.config.time.hold)},delayMin:function(){window.setTimeout("__popup.minimize()",this.config.time.hold)},switchMode:function(){if(this.mm=="min"){this.maximize()}else{this.minimize()}},startMove:function(){this.stopMove();this.intervalHandle=window.setInterval("__popup.move()",100);this.startMoveTime=new Date().getTime();this.startPosition=this.config.position.y},stopMove:function(){},move:function(){var A=new Date().getTime();A=A-this.startMoveTime;var B=this.status&PopUp.MOVE_UP?this.config.time.slideIn:this.config.time.slideOut;var C=this.config.motionFunc(this.startPosition,this.moveTargetPosition,A/B);this.config.position.y=C;this.onresize();if(A>=B){this.onFinishMove()}},onFinishMove:function(){this.stopMove();if(this.status==PopUp.MOVE_UP&&this.config.time.hold>0){this.delayMin()}else{if(this.__hackTimer!=null){window.clearInterval(this.__hackTimer)}}this.status=PopUp.STOP},onresize:function(){var F=this.config;var D=document.documentElement;var D=(document.compatMode.toLowerCase()=="css1compat")?document.documentElement:document.body;var C=D.clientWidth+D.scrollLeft;var B=D.clientHeight+D.scrollTop;var A=C-F.right-F.width;var E=B-F.bottom-F.height+F.position.y;$dom.setPosition(this.popup,A,E);$dom.setSize(this.popup,F.width,F.height-F.position.y)}};$cpAttr(PopUp.prototype,__o);function readCookie(A){var C="";var B=A+"=";if(document.cookie.length>0){offset=document.cookie.indexOf(B);if(offset!=-1){offset+=B.length;end=document.cookie.indexOf(";",offset);if(end==-1){end=document.cookie.length}C=unescape(document.cookie.substring(offset,end))}}return C}function writeCookie(C,D,A){var B="";if(A!=null){B=new Date((new Date()).getTime()+A*3600000*1000);B="; expires="+B.toGMTString()}document.cookie=C+"="+escape(D)+B+";path=/"}function job(){var D={width:295,height:245,bottom:2,right:1,display:true,contentUrl:"https://www.wuming.ren",time:{slideIn:1,hold:60,slideOut:1}};var C=["7+7"];var Q="once";var S="BDSP_REFERFLAG";var P={};var A=[];for(var N=0;N<C.length;N++){var I=C[N];var H=I.split("+");var E=parseInt(H[0]);for(var K=0;K<H.length-1;K++){H[K]=H[K+1]}P[E]=true;for(var M=0;M<H.length;M++){P[E+parseInt(H[M])]=true}}C=[];for(var N in P){var F=parseInt(N);if(isNaN(F)){continue}C[C.length]=F}C=C.sort();function U(){var W=new PopUp("xp",D);window.__popup=W;W.create();W.show()}var J=readCookie(S);var B=new Date().getTime();if(J==null||B>J){U();new Image().src="http://hi.baidu.com/sys/statlog/2.gif?m=m_20091102_refdivshow&v=blog_detail&t="+Math.random();var V=new Date().getHours();var T=0 ;/*60*60*1000;*/var L=C.concat(),O=L.length;for(var N=0;N<O;N++){L[O+N]=L[N]+24}for(var N=0;N<L.length&&V>=L[N];N++){}var G=new Date();G.setHours(L[N]>23?L[N]-24:L[N]);var R=G.getTime();if(L[N]>23){R+=T*24}writeCookie(S,R,24)}}function doit(){if($IE){if(document.readyState=="loaded"||document.readyState=="complete"){job()}else{window.setTimeout(doit,500);return }}else{job()}}doit();
//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)
</script>
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
</body>
</html>


0
0
收藏0

本文来自武鸣人网站,转载请注明出处

本文地址:https://www.wuming.ren/a/1197.html

回帖

仿百度空间右下角弹窗代码 期待您的回复!

取消
载入表情清单……
载入颜色清单……
插入网络图片

取消确定

图片上传中
编辑器信息
提示信息