复主代码 代码如下: <메타 콘텐츠= "text/html; charset=gb2312" http-equiv="Content-Type" /> <p>.shuoming {margin-top:20px; 테두리:1px 솔리드 #ccc; 패딩 하단:10px; 너비:600px; 여백:0 자동;}<br>.shuoming dt {높이:30px; 줄 높이:30px; 글꼴 두께:굵게; text-indent:10px;}<br>.shuoming dd {line-height:20px; padding:5px 20px;}<br> var delta=0.08<br> var collection;<br> function floaters() {<br> this.items = [];<br> this.addItem = function(id,x,y,content)<br> {<br> document.write('<DIV id=' id ' style="Z- 인덱스: 10; 위치: 절대; 너비:80px; 높이:60px;왼쪽:' (typeof(x)=='string'?eval(x):x) ';top:' (typeof(y)==' string'?eval(y):y) '">' 콘텐츠 '</DIV>');<br><br> var newItem = {};<br> newItem.object = document.getElementById(id) ;<br> newItem.x = x;<br> newItem.y = y;</p> <p> this.items[this.items.length] = newItem;<br> }<br> this.play = function()<br> {<br> 컬렉션 = this.items<br> setInterval('play('play('play) )',10);<br> }<br> }<br> 기능 재생()<br> {</p> <p> for(var i=0;i<collection.length;i )<BR> {<BR> var followObj = collection[i].object;<BR> var followObj_x = (typeof(collection[i].x )=='string'?eval(collection[i].x):collection[i].x);<BR> var followObj_y = (typeof(collection[i].y)=='string'?eval(collection [i].y):컬렉션[i].y);</P> if (foldgeobj.offsetleft! = (document.documentElement.scrollleft followobj_x)) {<🎜 🎜> var dx = (document.documentElement.scrollleft fac ?1:-1)*Math.ceil(Math.abs(dx));<P> followObj.style.left=followObj.offsetLeft dx;<BR> }<BR> <BR> if(followObj.offsetTop!=(document.documentElement.scrollTop followObj_y)) {<BR> var dy=(document.documentElement.scrollTop followObj_y-followObj.offsetTop)*delta;</P> dy=(dy>0 ?1:-1)*Math.ceil(Math.abs(dy));</p> <p> followObj.style.top=followObj.offsetTop dy;<br> }<br> followObj.style.display = '';<br> }<br> } <br><br> var theFloaters = new floaters();<br> //右face<br> theFloaters.addItem('followDiv1','document.documentElement.clientWidth-106',80, '<img src=http://pic.jb51.net/sudu.gif id=ad />');<br> //左face<br> theFloaters.addItem('followDiv2',6,80,' <img src=http://pic.jb51.net/sudu.gif id=ad />');<br> theFloaters.play();<br><br>//图文格式调사용 방법<br>//<a href=http://www.jb51.net.net/ target=_blank><img src=http://pic.jb51.net/sudu.gif border=0></a> ;<br><br>