<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ls /proc &#187; 网页设计</title>
	<atom:link href="http://www.lsproc.com/blog/tag/%e7%bd%91%e9%a1%b5%e8%ae%be%e8%ae%a1/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lsproc.com/blog</link>
	<description>lsproc.com</description>
	<lastBuildDate>Fri, 18 Nov 2011 09:22:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>自动等比例缩放网页中的图片</title>
		<link>http://www.lsproc.com/blog/auto_resize_images/</link>
		<comments>http://www.lsproc.com/blog/auto_resize_images/#comments</comments>
		<pubDate>Sat, 12 Jan 2008 07:34:14 +0000</pubDate>
		<dc:creator>lostsnow</dc:creator>
				<category><![CDATA[WebDesign]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[图片]]></category>
		<category><![CDATA[网页设计]]></category>

		<guid isPermaLink="false">http://www.lostk.com/blog/auto_resize_images/</guid>
		<description><![CDATA[转载时请标明文章原始出处和作者信息, 作者: lostsnow.http://www.lsproc.com/blog/auto_resize_images/ resizeimg.js window.onload = function() { for (var index = 0; index &#60; document.images.length; index++) { var widthRestriction = 400; var heightRestriction = 400; var rate = document.images[index].width / document.images[index].height; if (document.images[index].width &#62; widthRestriction) { document.images[index].width = widthRestriction; &#8230; <a href="http://www.lsproc.com/blog/auto_resize_images/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>转载时请标明文章原始出处和作者信息, 作者: <a href="http://www.lsproc.com/blog/">lostsnow</a>.<br /><a href="http://www.lsproc.com/blog/auto_resize_images/">http://www.lsproc.com/blog/auto_resize_images/</a></p>
<p>resizeimg.js</p>
<pre class="brush: javascript">
window.onload = function() {

    for (var index = 0; index &lt; document.images.length; index++) {

        var widthRestriction = 400;
        var heightRestriction = 400;
        var rate = document.images[index].width / document.images[index].height;

        if (document.images[index].width &gt; widthRestriction) {
            document.images[index].width = widthRestriction;
            document.images[index].height = widthRestriction / rate;
        } else if (document.images[index].height &gt; heightRestriction) {
            document.images[index].height = heightRestriction;
            document.images[index].width = heightRestriction * rate;
        }

        document.images[index].onclick = function() {window.open(this.src)};
        document.images[index].title = document.images[index].title + &#039; 点击在新窗口中查看原图&#039;;
    }
}
</pre>
<p>-- EOF --</p>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li>2010-04-13 -- <a href="http://www.lsproc.com/blog/copy_to_clipboard/" title="复制到剪切板 &#8211; 兼容 ie, firefox, chrome &#038; flash10">复制到剪切板 &#8211; 兼容 ie, firefox, chrome &#038; flash10</a> (5)</li><li>2009-01-08 -- <a href="http://www.lsproc.com/blog/ajax_char_lose/" title="Ajax 提交数据加号与连接符丢失">Ajax 提交数据加号与连接符丢失</a> (0)</li><li>2008-01-23 -- <a href="http://www.lsproc.com/blog/limit_textarea_length_by_js/" title="Js控制输入字符数限制">Js控制输入字符数限制</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.lsproc.com/blog/auto_resize_images/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

