漂浮广告的JS代码.doc
上传人:sy****28 上传时间:2024-09-11 格式:DOC 页数:2 大小:25KB 金币:16 举报 版权申诉
预览加载中,请您耐心等待几秒...

漂浮广告的JS代码.doc

漂浮广告的JS代码.doc

预览

在线预览结束,喜欢就下载吧,查找使用更方便

16 金币

下载此文档

如果您无法下载资料,请参考说明:

1、部分资料下载需要金币,请确保您的账户上有足够的金币

2、已购买过的文档,再次下载不重复扣费

3、资料包下载后请先用软件解压,在使用对应软件打开

<html><head><metahttp-equiv="Content-Type"mrc="text/html;charset=gb2312"/><title>漂浮广告www.zhuoyueztc.com</title></head><body><DIVid=img1style="Z-INDEX:100;LEFT:2px;WIDTH:59px;POSITION:absolute;TOP:43px;HEIGHT:61px;visibility:visible;"><ahref="http://www.mb5u.com"target="_blank"><imgsrc="/jscss/demoimg/200908/pic.gif"width="80"height="80"border="0"></a></DIV><SCRIPT>varxPos=300;varyPos=200;varstep=1;vardelay=30;varheight=0;varHoffset=0;varWoffset=0;varyon=0;varxon=0;varpause=true;varinterval;img1.style.top=yPos;functionchangePos(){width=document.body.clientWidth;height=document.body.clientHeight;Hoffset=img1.offsetHeight;Woffset=img1.offsetWidth;img1.style.left=xPos+document.body.scrollLeft;img1.style.top=yPos+document.body.scrollTop;if(yon){yPos=yPos+step;}else{yPos=yPos-step;}if(yPos<0){yon=1;yPos=0;}if(yPos>=(height-Hoffset)){yon=0;yPos=(height-Hoffset);}if(xon){xPos=xPos+step;}else{xPos=xPos-step;}if(xPos<0){xon=1;xPos=0;}if(xPos>=(width-Woffset)){xon=0;xPos=(width-Woffset);}}functionstart(){img1.visibility="visible";interval=setInterval('changePos()',delay);}functionpause_resume(){if(pause){clearInterval(interval);pause=false;}else{interval=setInterval('changePos()',delay);pause=true;}}start();</SCRIPT></body></html>