<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[沧海一粟]]></title> 
<link>http://www.dzhope.com/index.php</link> 
<description><![CDATA[Web系统架构与服务器运维,php开发]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[沧海一粟]]></copyright>
<item>
<link>http://www.dzhope.com/post//</link>
<title><![CDATA[用JS控制页面图的图片大小的通用代码]]></title> 
<author>jed &lt;jed521@163.com&gt;</author>
<category><![CDATA[代码编程]]></category>
<pubDate>Thu, 12 Oct 2006 00:42:47 +0000</pubDate> 
<guid>http://www.dzhope.com/post//</guid> 
<description>
<![CDATA[ 
	这个一般用于文章查看的页面,针对新闻性质的网站,此外这个算法是直接分析网页中所有图片的,因此如果你的版面设计中有比指定宽度大的图片是不能用这个函数的(或者用id区分开)<br/><br/><br/><div class="code"><br/><br/><br/>&lt;script language=&quot;javascript&quot;&gt;<br/>function ResizeImages()<br/>&#123;<br/> &nbsp; var myimg,oldwidth;<br/> &nbsp; var maxwidth=600;<br/> &nbsp; for(i=0;i&lt;document.images.length;i++)&#123;<br/> &nbsp; &nbsp; myimg = document.images&#91;i&#93;;<br/> &nbsp; &nbsp; if(myimg.width &gt; maxwidth)<br/> &nbsp; &nbsp; &#123;<br/> &nbsp; &nbsp; &nbsp; &nbsp;oldwidth = myimg.width;<br/> &nbsp; &nbsp; &nbsp; &nbsp;myimg.width = maxwidth;<br/> &nbsp; &nbsp; &nbsp; &nbsp;myimg.height = myimg.height * (maxwidth/oldwidth);<br/> &nbsp; &nbsp; &#125;<br/> &nbsp; &#125;<br/>&#125;<br/>ResizeImages();<br/>&lt;/script&gt;<br/><br/></div><br/><br/><br/>Tags - <a href="http://www.dzhope.com/tags/js/" rel="tag">js</a>
]]>
</description>
</item><item>
<link>http://www.dzhope.com/post//#blogcomment</link>
<title><![CDATA[[评论] 用JS控制页面图的图片大小的通用代码]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.dzhope.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>