>웹 프론트엔드 >JS 튜토리얼 >javascript 시나 팝언더 광고 구현 code_광고 코드

javascript 시나 팝언더 광고 구현 code_광고 코드

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB원래의
2016-05-16 18:50:251320검색

오늘 Sina의 js 코드를 확인해보니 학습적인 측면과 사용적인 측면 모두 좋은 리어 프로젝션 광고 코드를 발견했습니다. 그런데 문제가 발견되어 차단됩니다.
다음은 구체적인 js 코드입니다

코드를 복사하세요 코드는 다음과 같습니다

/*
캐러셀 후면 투사 RotatorPB v3.1
업데이트 by Dakular 2008-8-25
형식: new RotatorPB(광고 배열)
설명: 첫 번째 방문 시 무작위로 표시되고 다음 방문 시에는 순서대로 순환됩니다. 만료된 광고는 자동으로 필터링됩니다. 광고 개수가 부족할 경우 쿠키 시간은 24시간입니다.
*/
if(typeof (RotatorPB)!='function'){
var RotatorPB=function (rad){
this.ary = new Array()
this.date = new Date() ;
this.w = rad.width;
this.num = rad.num;
this. id = RotatorPB.id;
this.m = 'rpb_' this.id;
this.n = new Array()
this.L = new Date(); = 0;
var f;
var D = false;
var nn = 0; //잘못된 광고 필터링
for(var i=0; i var start = RotatorPB.strToDate(rad[i][2].replace('','').replace('',''))
    var end = RotatorPB.strToDate(rad[i][3].replace('','').replace('',''),true)
     if (this.date>start && this.date This.ary.push([rad[i][0 ], rad[i] [1], rad[i][4]]);
                                                         0;i                                                                                            {
이.n[i]=g ;
D=true;
this.n[i]=0;
                                                   (!D){
var r=Math.ceil(Math.random()*this.o); 🎜> var t=this.m '_' r;
RotatorPB.S(t,this .L.getTime(),1440)
this.e=r
if(this.o ==1){RotatorPB.S('s_dl',r,1440);}
/ /return r
}else {
            var R=this.n.join(',').split(',');
            var k=R.sort();
            var max=Number(k[k.length-1]);
            var min=Number(k[0]);
            var F;
            for(var i=0;i               if(max==this.n[i]){
                  F=i 1;
                    휴식;
               }
            }
            if(typeof(F)!='undefine'){
              G=this.m '_' F;
                H=숫자(RotatorPB.G(G));
                I=F%this.o 1;
                J=this.m '_' I;
                RotatorPB.S(J,this.L.getTime(),1440);
               if(this.o==1){
                  I=-RotatorPB.G('s_dl');
                   if(I==0){I=1;RotatorPB.S('s_dl',1,1440);}
                  RotatorPB.S('s_dl',I,1440);
               }
                this.e=I;
                //I를 반환합니다.
            }
        }
        //광고 표시
        if(this.e==0 || this.ary.length==0) return; //如果没有广告则不显示
        if(this.e==-1) return; //当只有一个广告时:始终显示第一个/奇数次刷new显示
        var n = this.e-1;
        var btsrc = this.ary[n][0];
        var bturl = this.ary[n][1];
        var bttype = btsrc.substring(btsrc.length-3).toLowerCase();
        if(bttype=='.js'){ //js
            document.write('


상면적 beitou.jpg是图文字地址,后면적是链接,开始日期结束日期什么的大家参考下就可以了。
성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.