50 分求“页面漂浮广告”代码

谢谢。
---------------------------------------------------------------

 1<script>   
 2document.write('<DIV id=mov6 style="POSITION: absolute; width: 10px; height: 10px"><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH=80 HEIGHT=80><PARAM NAME=movie VALUE="http://www.163.net/ad/adv/netcn/netcn_100x100.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="http://www.163.net/ad/adv/netcn/netcn_100x100.swf" quality=high bgcolor=#FFFFFF WIDTH=80 HEIGHT=80 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED></OBJECT><img src="http://bjad.163.net/image.ng/site=www163net&channel=163mainpage&SpaceDesc=mainpage&location=moving2" width="1" height="1" border="0"></DIV>');   
 3  
 4var xPos = 250;   
 5var yPos = document.body.clientHeight;   
 6var step = 1;   
 7var delay = 20;   
 8var height = 0;   
 9var Hoffset = 0;   
10var Woffset = 0;   
11var yon = 0;   
12var xon = 0;   
13var pause = true;   
14var interval;   
15mov6.style.top = yPos;   
16function changePos() {   
17width = document.body.clientWidth;   
18height = document.body.clientHeight;   
19Hoffset = mov6.offsetHeight;   
20Woffset = mov6.offsetWidth;   
21mov6.style.left = xPos + document.body.scrollLeft;   
22mov6.style.top = yPos + document.body.scrollTop;   
23if (yon) {   
24yPos = yPos + step;   
25}   
26else {   
27yPos = yPos - step;   
28}   
29if (yPos < 0) {   
30yon = 1;   
31yPos = 0;   
32}   
33if (yPos >= (height - Hoffset)) {   
34yon = 0;   
35yPos = (height - Hoffset);   
36}   
37if (xon) {   
38xPos = xPos + step;   
39}   
40else {   
41xPos = xPos - step;   
42}   
43if (xPos < 0) {   
44xon = 1;   
45xPos = 0;   
46}   
47if (xPos >= (width - Woffset)) {   
48xon = 0;   
49xPos = (width - Woffset);   
50}   
51}   
52function start() {   
53mov6.visibility = "visible";   
54interval = setInterval('changePos()', delay);   
55}   
56  
57start();   
58</script>
Published At
Categories with Web编程
comments powered by Disqus