文档介绍:现在很多网站广告做的如火如荼,现在我就来介绍一下常见的对联浮动广告效果的代码使用方法,介绍的这种效果,在1024*768分辨率下正常显示,在800*600的分辨率下可以自动隐藏,以免遮住页面影响访问者浏览内容,下面就是实现效果所需代码:vardelta=;functionfloaters(){=[];=function(id,x,y,content){('<DIVid='+id+'style="Z-INDEX:0;POSITION:absolute;width:80px;height:60px;left:'+(typeof(x)=='string'?eval(x):x)+';top:'+(typeof(y)=='string'?eval(y):y)+'">'+content+'</DIV>');varnewItem={};=(id);=x;=y;[]=newItem;}=function(){collection=('play()',10);}}functionplay(){if(<=800){for(vari=0;i<;i++){collection[i].='none';}return;}for(vari=0;i<;i++){varfollowObj=collection[i].object;varfollowObj_x=(typeof(collection[i].x)=='string'?eval(collection[i].x):collection[i].x);varfollowObj_y=(typeof(collection[i].y)=='string'?eval(collection[i].y):collection[i].y);if(!=(+followObj_x)){vardx=(+followObj_x-)*delta;dx=(dx>0?1:-1)*((dx));=+dx;}if(!=(+followObj_y)){vardy=(+followObj_y-)*delta;dy=(dy>0?1:-1)*((dy));=