A piece of JS left and right advertising code, as long as the change of the advertising picture address and connection address, the corresponding parameters according to the page adjustment can be used this paragraph around the suspension of advertising code
Code:
var delta=0.15 var collection;
function floaters () {this.items =; This.additem = function (id,x,y,content) {document.write (' <div id= ' +id+ style= ' z-index:10; Position:absolute; width:80px; Height:60px;left: ' + (typeof (x) = = ' string '? Eval (x): x) + '; Top: ' + (typeof (y) = = ' string '? Eval (y): y) + ' "> ' +content+ '
</DIV> ');
var newitem = {};
Newitem.object = document.getElementById (ID);
newitem.x = x;
Newitem.y = y;
This.items[this.items.length] = NewItem;
} This.play = function () {collection = This.items setinterval (' Play () ', 10);
} function Play () {for (Var i=0;i<collection.length;i++) {var followobj = Collection[i].object;
var followobj_x = (typeof (collection[i].x) = = ' String ' eval (collection[i].x): collection[i].x);
var followobj_y = (typeof (collection[i].y) = = ' String ' eval (collection[i].y): COLLECTION[I].Y); if (followobj.offsetleft!= (document.body.scrollleft+followobj_x)) {var dx= (document.body.scrollleft+followobj_x-followobj.offsetleft) *delta;
dx= (dx>0?1:-1) *math.ceil (math.abs (DX));
FOLLOWOBJ.STYLE.LEFT=FOLLOWOBJ.OFFSETLEFT+DX; } if (followobj.offsettop!= (document.body.scrolltop+followobj_y)) {var dy= (document.body.scrolltop+followobj_
Y-followobj.offsettop) *delta;
Dy= (dy>0?1:-1) *math.ceil (Math.Abs (dy));
Followobj.style.top=followobj.offsettop+dy;
} followObj.style.display = ';
} var thefloaters = new Floaters (); Thefloaters.additem (' FollowDiv1 ', ' document.body.clientwidth-112 ', 230, ' <a href= left link address target=_blank></a> '); Thefloaters.additem (' FollowDiv2 ', 12,230, ' <a href= right link address target=_blank></a
> '); Thefloaters.play ();
Save As *.js file, referenced in the page: <script src= "*.js" ></script> call can, * on behalf of your saved file name!
Note: Modify the advertisement picture address and the connection address! The corresponding parameters can be adjusted according to the page itself.