<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[虫虫的blog  SINCE2004]]></title> 
<link>http://www.zhenghe.biz/index.php</link> 
<description><![CDATA[人生幻灯片  -   前半生(身)，不要怕；后半生(身)，不要悔！]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[虫虫的blog  SINCE2004]]></copyright>
<item>
<link>http://www.zhenghe.biz/read.php/.htm</link>
<title><![CDATA[页面两侧对联广告代码效果]]></title> 
<author>网络毛毛虫 &lt;admin@yourname.com&gt;</author>
<category><![CDATA[技术文章]]></category>
<pubDate>Fri, 09 Dec 2005 00:37:29 +0000</pubDate> 
<guid>http://www.zhenghe.biz/read.php/.htm</guid> 
<description>
<![CDATA[ 
	在1024*768分辨率下正常显示，在800*600的分辨率下可以自动隐藏，以免遮住页面影响访问者浏览内容，下面文本框中就是实现效果所需代码：<p>　　var delta=0.015<br />　　var collection;<br />　　function floaters() &#123;<br />　　　　this.items　　= [];<br />　　　　this.addItem　　= function(id,x,y,content)<br />　　　　　　　　　&#123;<br />　　　　　　　　　　document.write('&lt;DIV id='+id+' style=&quot;Z-INDEX: 0; POSITION: absolute;　width:80px; height:60px;left:'+(typeof(x)=='string'?eval(x):x)+';top:'+(typeof(y)=='string'?eval(y):y)+'&quot;&gt;'+content+'&lt;/DIV&gt;');<br />　　　　　　　　　　<br />　　　　　　　　　　var newItem　　　　　　　　= &#123;&#125;;<br />　　　　　　　　　　newItem.object　　　　　　= document.getElementById(id);<br />　　　　　　　　　　newItem.x　　　　　　　　= x;<br />　　　　　　　　　　newItem.y　　　　　　　　= y;</p><p>　　　　　　　　　　this.items[this.items.length]　　　　= newItem;<br />　　　　　　　　　&#125;<br />　　　　this.play　　= function()<br />　　　　　　　　　&#123;<br />　　　　　　　　　　collection　　　　　　　　= this.items<br />　　　　　　　　　　setInterval('play()',10);<br />　　　　　　　　　&#125;<br />　　　　&#125;<br />　　　　function play()<br />　　　　&#123;<br />　　　　　　if(screen.width&lt;=800)<br />　　　　　　&#123;<br />　　　　　　　　for(var i=0;i&lt;collection.length;i++)<br />　　　　　　　　&#123;<br />　　　　　　　　　　collection[i].object.style.display　　= 'none';<br />　　　　　　　　&#125;<br />　　　　　　　　return;<br />　　　　　　&#125;<br />　　　　　　for(var i=0;i&lt;collection.length;i++)<br />　　　　　　&#123;<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):collection[i].y);</p><p>　　　　　　　　if(followObj.offsetLeft!=(document.body.scrollLeft+followObj_x)) &#123;<br />　　　　　　　　　　var dx=(document.body.scrollLeft+followObj_x-followObj.offsetLeft)*delta;<br />　　　　　　　　　　dx=(dx&gt;0?1:-1)*Math.ceil(Math.abs(dx));<br />　　　　　　　　　　followObj.style.left=followObj.offsetLeft+dx;<br />　　　　　　　　　　&#125;</p><p>　　　　　　　　if(followObj.offsetTop!=(document.body.scrollTop+followObj_y)) &#123;<br />　　　　　　　　　　var dy=(document.body.scrollTop+followObj_y-followObj.offsetTop)*delta;<br />　　　　　　　　　　dy=(dy&gt;0?1:-1)*Math.ceil(Math.abs(dy));<br />　　　　　　　　　　followObj.style.top=followObj.offsetTop+dy;<br />　　　　　　　　　　&#125;<br />　　　　　　　　followObj.style.display　　= '';<br />　　　　　　&#125;<br />　　　　&#125;　　<br />　　　　<br />　　var theFloaters　　　　= new floaters();<br />　　theFloaters.addItem('followDiv1','document.body.clientWidth-100',0,'&lt;/a&gt;&lt;br&gt;&lt;a href=广告链接地址 target=_blank&gt;&lt;img src=广告图片地址 width=100 height=400 border=0&gt;&lt;/a&gt;');<br />　　theFloaters.addItem('followDiv2',0,0,'&lt;br&gt;&lt;a href=广告链接地址 target=_blank&gt;&lt;img src=广告图片地址 width=100 height=400 border=0&gt;&lt;/a&gt;');<br />　　theFloaters.play();　</p><p>把上面的代码另存为一个JS文件，然后在想实现此效果的页面用&lt;script type=&quot;text/javascript&quot; language=&quot;javascript1.2&quot; src=&quot;*.js&quot;&gt;&lt;/SCRIPT&gt;调用即可，*代表你另存的文件名！注意修改广告图片地址和连接地址！</p>
]]>
</description>
</item><item>
<link>http://www.zhenghe.biz/read.php/.htm#blogcomment</link>
<title><![CDATA[[评论] 页面两侧对联广告代码效果]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.zhenghe.biz/read.php/.htm#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>