<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://www.jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>http://www.jackxiang.com/post//</link>
<title><![CDATA[限制图片大小的js函数学习]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[WEB2.0]]></category>
<pubDate>Wed, 11 Nov 2009 08:50:47 +0000</pubDate> 
<guid>http://www.jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	<br/><div class="code"><br/>function&nbsp;&nbsp; SetImgSize(pimg,iw,ih)&nbsp;&nbsp; &#123;&nbsp;&nbsp; <br/>&nbsp;&nbsp;var&nbsp;&nbsp; img&nbsp;&nbsp; =&nbsp;&nbsp; new&nbsp;&nbsp; Image(); <br/>&nbsp;&nbsp;img.src = pimg.src;&nbsp;&nbsp; <br/>&nbsp;&nbsp;var&nbsp;&nbsp; w&nbsp;&nbsp; =&nbsp;&nbsp; iw;&nbsp;&nbsp; <br/>&nbsp;&nbsp;var&nbsp;&nbsp; h&nbsp;&nbsp; =&nbsp;&nbsp; ih;&nbsp;&nbsp; <br/>&nbsp;&nbsp;<br/> if(img.width&gt;0 &amp;&amp; img.height&gt;0)<br/>&nbsp;&nbsp;&#123;&nbsp;&nbsp; <br/>&nbsp;&nbsp;if(img.width&gt;iw&#124;&#124;img.height&gt;ih)<br/>&nbsp;&nbsp;&#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;if((iw&nbsp;&nbsp; /&nbsp;&nbsp; ih)&nbsp;&nbsp; &gt;&nbsp;&nbsp; (img.width&nbsp;&nbsp; /&nbsp;&nbsp; img.height))&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp;&#123;&nbsp;&nbsp; <br/>&nbsp;&nbsp; h =&nbsp;&nbsp;ih;&nbsp;&nbsp; <br/>&nbsp;&nbsp; w&nbsp;&nbsp; =&nbsp;&nbsp; img.width&nbsp;&nbsp; *&nbsp;&nbsp; (ih&nbsp;&nbsp; /&nbsp;&nbsp; img.height);&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp;&#125;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp;else&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp;&#123;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp; w&nbsp;&nbsp; =&nbsp;&nbsp; iw;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp; h&nbsp;&nbsp; =&nbsp;&nbsp; img.height&nbsp;&nbsp; *&nbsp;&nbsp; (iw&nbsp;&nbsp; /&nbsp;&nbsp; img.width);&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp;&#125;&nbsp;&nbsp; <br/>&nbsp;&nbsp; &#125;<br/>&nbsp;&nbsp; else<br/>&nbsp;&nbsp;&#123;<br/>&nbsp;&nbsp;w = img.width;<br/>&nbsp;&nbsp;h = img.height;<br/>&nbsp;&nbsp;&#125;<br/>&nbsp;&nbsp;&#125;<br/>&nbsp;&nbsp;<br/>&nbsp;&nbsp;<br/>&nbsp;&nbsp;pimg.width=w;&nbsp;&nbsp; <br/>&nbsp;&nbsp;pimg.height=h;&nbsp;&nbsp; <br/>&nbsp;&nbsp;pimg.style.display=&quot;&quot;;&nbsp;&nbsp;<br/>&#125;<br/><br/></div><br/><br/><br/>调用：<br/><br/><div class="code"><br/>&lt;img height=&quot;288&quot; border=&quot;0&quot; width=&quot;216&quot; onload=&quot;SetImgSize(this,217,288)&quot; src=&quot;http://maestro.***.com/data/112962842_big_2009_11_10_23_50_48_1.jpg&quot;/&gt;<br/><br/></div>
]]>
</description>
</item><item>
<link>http://www.jackxiang.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.jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>