<?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>雨无形的BLOG &#187; JavaScript</title>
	<atom:link href="http://www.yuwuxing.com/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.yuwuxing.com</link>
	<description>关注互联网发展</description>
	<lastBuildDate>Fri, 23 Dec 2011 04:00:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>根据访问者分辨率，自动调用不同版式CSS的代码</title>
		<link>http://www.yuwuxing.com/change-the-layout-css-for-different-resolution/</link>
		<comments>http://www.yuwuxing.com/change-the-layout-css-for-different-resolution/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 02:03:33 +0000</pubDate>
		<dc:creator>雨无形</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[网页设计]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[分辨率]]></category>

		<guid isPermaLink="false">http://www.yuwuxing.com/?p=49</guid>
		<description><![CDATA[<p>虽然现在已经基本淘汰800分辨率了1024已经成为主流，但是随着大屏幕液晶的不断降价，更高的分辨率将会逐步成为主流，为了适应越来越大的分辨率，有时候我们会采用流体布局，但是流体布局有时候也有局限性，下面一段js可以实现根据用户客户端分辨率的不同，调用不同的css代码来实现适应不同分辨率的效果。</p><table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fbuilt-sexy-css%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fchange-the-layout-css-for-different-resolution%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">译文:创建性感的CSS（ZT）</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fcss-text-shadow%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fchange-the-layout-css-for-different-resolution%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">CSS文字阴影效果</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2F20-beautiful-ajax-css-table%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fchange-the-layout-css-for-different-resolution%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">20 个漂亮的 Ajax + CSS 表格</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fcss3-columns-attribute%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fchange-the-layout-css-for-different-resolution%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">CSS3 Columns属性研究</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fthe-css-priority%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fchange-the-layout-css-for-different-resolution%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">详解CSS的优先权（ZT）</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>虽然现在已经基本淘汰800分辨率了1024已经成为主流，但是随着大屏幕液晶的不断降价，更高的分辨率将会逐步成为主流，为了适应越来越大的分辨率，有时候我们会采用流体布局，但是流体布局有时候也有局限性，下面一段js可以实现根据用户客户端分辨率的不同，调用不同的css代码来实现适应不同分辨率的效果。</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> Swidth <span style="color: #339933;">=</span> screen.<span style="color: #660066;">width</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> Surl <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;http://www.yours.com/&quot;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> Skin <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;cssstyle1.css&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;cssstyle2.css&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> Skintemp<span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>Swidth <span style="color: #339933;">&gt;=</span> <span style="color: #CC0000;">1280</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    Surl <span style="color: #339933;">+=</span> <span style="color: #3366CC;">&quot;skin_1200&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
    Surl <span style="color: #339933;">+=</span> <span style="color: #3366CC;">&quot;skin&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> Skin.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    Skintemp <span style="color: #339933;">=</span> document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;link&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    Skintemp.<span style="color: #660066;">type</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;text/css&quot;</span><span style="color: #339933;">;</span>
    Skintemp.<span style="color: #660066;">rel</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;stylesheet&quot;</span><span style="color: #339933;">;</span>
    Skintemp.<span style="color: #660066;">href</span> <span style="color: #339933;">=</span> Surl <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;/&quot;</span> <span style="color: #339933;">+</span> Skin<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    document.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;head&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>Skintemp<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fbuilt-sexy-css%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fchange-the-layout-css-for-different-resolution%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">译文:创建性感的CSS（ZT）</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fcss-text-shadow%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fchange-the-layout-css-for-different-resolution%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">CSS文字阴影效果</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2F20-beautiful-ajax-css-table%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fchange-the-layout-css-for-different-resolution%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">20 个漂亮的 Ajax + CSS 表格</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fcss3-columns-attribute%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fchange-the-layout-css-for-different-resolution%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">CSS3 Columns属性研究</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fthe-css-priority%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fchange-the-layout-css-for-different-resolution%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">详解CSS的优先权（ZT）</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://www.yuwuxing.com/change-the-layout-css-for-different-resolution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>让IE支持min-height/width max-height/width 的JS</title>
		<link>http://www.yuwuxing.com/min-height-and-max-height-for-ie/</link>
		<comments>http://www.yuwuxing.com/min-height-and-max-height-for-ie/#comments</comments>
		<pubDate>Wed, 23 Jan 2008 08:45:47 +0000</pubDate>
		<dc:creator>雨无形</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[网页设计]]></category>
		<category><![CDATA[ie]]></category>

		<guid isPermaLink="false">http://www.yuwuxing.com/?p=7</guid>
		<description><![CDATA[<p>ie不支持min-width/max-width min-height/min-width有时候做些效果有些不便，这个js可以让IE支持这个效果</p><table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fdoctype-influence-javascript%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fmin-height-and-max-height-for-ie%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">由修改漂浮广告代码而学到的DOCTYPE声明对JS的影响</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fmove-ad-code%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fmin-height-and-max-height-for-ie%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">我修改的,支持FF和IE的漂浮广告代码</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fimage-auto-zoom-code%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fmin-height-and-max-height-for-ie%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">图片超过大小自动缩放代码</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fietester%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fmin-height-and-max-height-for-ie%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">IETester多IE版本共存的解决方案</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fchange-the-layout-css-for-different-resolution%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fmin-height-and-max-height-for-ie%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">根据访问者分辨率，自动调用不同版式CSS的代码</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>ie不支持min-width/max-width min-height/min-width有时候做些效果有些不便，这个js可以让IE支持这个效果 <a href="http://www.yuwuxing.com/wp-content/uploads/minmax.js" target="_blank">minmax.js</a></p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fdoctype-influence-javascript%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fmin-height-and-max-height-for-ie%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">由修改漂浮广告代码而学到的DOCTYPE声明对JS的影响</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fmove-ad-code%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fmin-height-and-max-height-for-ie%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">我修改的,支持FF和IE的漂浮广告代码</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fimage-auto-zoom-code%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fmin-height-and-max-height-for-ie%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">图片超过大小自动缩放代码</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fietester%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fmin-height-and-max-height-for-ie%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">IETester多IE版本共存的解决方案</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fchange-the-layout-css-for-different-resolution%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fmin-height-and-max-height-for-ie%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">根据访问者分辨率，自动调用不同版式CSS的代码</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://www.yuwuxing.com/min-height-and-max-height-for-ie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>图片超过大小自动缩放代码</title>
		<link>http://www.yuwuxing.com/image-auto-zoom-code/</link>
		<comments>http://www.yuwuxing.com/image-auto-zoom-code/#comments</comments>
		<pubDate>Tue, 22 Jan 2008 11:47:13 +0000</pubDate>
		<dc:creator>雨无形</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[网页设计]]></category>

		<guid isPermaLink="false">http://www.yuwuxing.com/?p=6</guid>
		<description><![CDATA[<p>网页中图片超过指定大小自动缩放，并且可以点击看大图的代码</p><table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fdoctype-influence-javascript%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fimage-auto-zoom-code%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">由修改漂浮广告代码而学到的DOCTYPE声明对JS的影响</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fchange-the-layout-css-for-different-resolution%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fimage-auto-zoom-code%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">根据访问者分辨率，自动调用不同版式CSS的代码</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fmove-ad-code%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fimage-auto-zoom-code%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">我修改的,支持FF和IE的漂浮广告代码</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fmin-height-and-max-height-for-ie%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fimage-auto-zoom-code%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">让IE支持min-height/width max-height/width 的JS</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Ftab-focus-code%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fimage-auto-zoom-code%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">一个可以多页签切换的JS焦点图代码</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>以下是网页中图片超过指定大小自动缩放，并且可以点击看大图的代码</p>
<p>[CODE=javascript] //改变图片大小 function resizeImg() { var contentwidth=565;//设置图片最大宽度 var imageAll=document.getElementById(&quot;con&quot;).getElementsByTagName(&quot;img&quot;);//con为图片所在层的ID var turewidth,tureheight; if (imageAll !=null) { for (i=0; iimageAll[i].width) { if(imageAll[i].height==tureheight) { imageAll[i].style.height=imageAll[i].height/turewidth*imageAll[i].width+&quot;px&quot;; } imageAll[i].onclick=function(){window.open(this.src)}; imageAll[i].style.cursor=&quot;pointer&quot;; imageAll[i].title=&quot;点击查看原始尺寸：&quot;+turewidth+&quot;*&quot;+tureheight+&quot;px&quot;; } else { imageAll[i].style.width=turewidth+&quot;px&quot;; } } } } if (window.addEventListener) window.addEventListener(&quot;load&quot;, resizeImg, false); else if (window.attachEvent) window.attachEvent(&quot;onload&quot;, resizeImg); else window.onload=resizeImg [/CODE]</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fdoctype-influence-javascript%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fimage-auto-zoom-code%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">由修改漂浮广告代码而学到的DOCTYPE声明对JS的影响</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fchange-the-layout-css-for-different-resolution%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fimage-auto-zoom-code%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">根据访问者分辨率，自动调用不同版式CSS的代码</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fmove-ad-code%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fimage-auto-zoom-code%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">我修改的,支持FF和IE的漂浮广告代码</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fmin-height-and-max-height-for-ie%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fimage-auto-zoom-code%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">让IE支持min-height/width max-height/width 的JS</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Ftab-focus-code%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fimage-auto-zoom-code%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">一个可以多页签切换的JS焦点图代码</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://www.yuwuxing.com/image-auto-zoom-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>由修改漂浮广告代码而学到的DOCTYPE声明对JS的影响</title>
		<link>http://www.yuwuxing.com/doctype-influence-javascript/</link>
		<comments>http://www.yuwuxing.com/doctype-influence-javascript/#comments</comments>
		<pubDate>Mon, 21 Jan 2008 15:15:46 +0000</pubDate>
		<dc:creator>雨无形</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[网页设计]]></category>
		<category><![CDATA[DOCTYPE]]></category>

		<guid isPermaLink="false">http://www.yuwuxing.com/?p=5</guid>
		<description><![CDATA[<p>经常有些JS代码明明在别人网页上可以运行，拷贝过来运行却出错，这个时候可以检查下是不是DOCTYPE声明的问题</p><table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fimage-auto-zoom-code%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fdoctype-influence-javascript%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">图片超过大小自动缩放代码</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fmove-ad-code%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fdoctype-influence-javascript%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">我修改的,支持FF和IE的漂浮广告代码</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fmin-height-and-max-height-for-ie%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fdoctype-influence-javascript%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">让IE支持min-height/width max-height/width 的JS</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fchange-the-layout-css-for-different-resolution%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fdoctype-influence-javascript%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">根据访问者分辨率，自动调用不同版式CSS的代码</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fdouban-css-js%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fdoctype-influence-javascript%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">很久没更新了，分享一个豆瓣的CSS和js开发规范</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>经常有些JS代码明明在别人网页上可以运行，拷贝过来运行却出错，这个时候可以检查下是不是DOCTYPE声明的问题</p>
<p>在没有DOCTYPE声明的情况下:</p>
<p>document.body.clientWidth</p>
<p>document.body.clientHeight</p>
<p>为当前窗口的宽度/高度;</p>
<p>在DOCTYPE声明以后</p>
<p>document.body.clientWidth</p>
<p>document.body.clientHeight</p>
<p>为整个页面的宽度/高度;</p>
<p>document.documentElement.clientWidth</p>
<p>document.documentElement.clientHeight</p>
<p>为当前窗口的宽度/高度;</p>
<p>同样增加DOCTYPE声明后</p>
<p>document.body.scrollLeft</p>
<p>document.body.scrollTop</p>
<p>要改为</p>
<p>document.documentElement.scrollLeft</p>
<p>document.documentElement.scrollTop</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fimage-auto-zoom-code%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fdoctype-influence-javascript%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">图片超过大小自动缩放代码</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fmove-ad-code%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fdoctype-influence-javascript%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">我修改的,支持FF和IE的漂浮广告代码</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fmin-height-and-max-height-for-ie%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fdoctype-influence-javascript%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">让IE支持min-height/width max-height/width 的JS</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fchange-the-layout-css-for-different-resolution%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fdoctype-influence-javascript%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">根据访问者分辨率，自动调用不同版式CSS的代码</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fdouban-css-js%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fdoctype-influence-javascript%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">很久没更新了，分享一个豆瓣的CSS和js开发规范</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://www.yuwuxing.com/doctype-influence-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>我修改的,支持FF和IE的漂浮广告代码</title>
		<link>http://www.yuwuxing.com/move-ad-code/</link>
		<comments>http://www.yuwuxing.com/move-ad-code/#comments</comments>
		<pubDate>Mon, 21 Jan 2008 15:01:01 +0000</pubDate>
		<dc:creator>雨无形</dc:creator>
				<category><![CDATA[网页设计]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.yuwuxing.com/?p=4</guid>
		<description><![CDATA[<p>网上搜索的一段代码,但是加上DOCTYPE后就不能用了,于是乎修改了一下,现在完美支持FF和IE</p><table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fchange-the-layout-css-for-different-resolution%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fmove-ad-code%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">根据访问者分辨率，自动调用不同版式CSS的代码</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fone-code-to-change-webpage-to-blackandwhite%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fmove-ad-code%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">举国同悲，一条CSS代码把网页变黑白</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fthe-css-priority%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fmove-ad-code%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">详解CSS的优先权（ZT）</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fbuilt-sexy-css%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fmove-ad-code%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">译文:创建性感的CSS（ZT）</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2F20-beautiful-ajax-css-table%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fmove-ad-code%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">20 个漂亮的 Ajax + CSS 表格</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>网上搜索的一段代码,但是加上DOCTYPE后就不能用了,于是乎修改了一下,现在完美支持FF和IE</p>
<p>JS代码如下：</p>
<div>
<div class="dp-highlighter">
<div class="bar">&nbsp;</div>
<ol class="dp-c">
<li class="alt"><span><span class="keyword">var</span><span>&nbsp;img&nbsp;=&nbsp;document.getElementById(</span><span class="string">&quot;img&quot;</span><span>); &nbsp;&nbsp;</span></span></li>
<li><span class="keyword">var</span><span>&nbsp;xPos&nbsp;=&nbsp;20; &nbsp;&nbsp;</span></li>
<li class="alt"><span class="keyword">var</span><span>&nbsp;yPos&nbsp;=&nbsp;document.documentElement.clientWidth&nbsp;-&nbsp;img.offsetHeight; &nbsp;&nbsp;</span></li>
<li><span class="keyword">var</span><span>&nbsp;step&nbsp;=&nbsp;1; &nbsp;&nbsp;</span></li>
<li class="alt"><span class="keyword">var</span><span>&nbsp;delay&nbsp;=&nbsp;5; &nbsp;&nbsp;</span></li>
<li><span class="keyword">var</span><span>&nbsp;height&nbsp;=&nbsp;0; &nbsp;&nbsp;</span></li>
<li class="alt"><span class="keyword">var</span><span>&nbsp;Hoffset&nbsp;=&nbsp;0; &nbsp;&nbsp;</span></li>
<li><span class="keyword">var</span><span>&nbsp;Woffset&nbsp;=&nbsp;0; &nbsp;&nbsp;</span></li>
<li class="alt"><span class="keyword">var</span><span>&nbsp;yon&nbsp;=&nbsp;0; &nbsp;&nbsp;</span></li>
<li><span class="keyword">var</span><span>&nbsp;xon&nbsp;=&nbsp;0; &nbsp;&nbsp;</span></li>
<li class="alt"><span class="keyword">var</span><span>&nbsp;pause&nbsp;=&nbsp;</span><span class="keyword">true</span><span>; &nbsp;&nbsp;</span></li>
<li><span class="keyword">var</span><span>&nbsp;interval; &nbsp;&nbsp;</span></li>
<li class="alt"><span>img.style.top&nbsp;=&nbsp;yPos&nbsp;+&nbsp;</span><span class="string">&quot;px&quot;</span><span>; &nbsp;&nbsp;</span></li>
<li><span class="keyword">function</span><span>&nbsp;changePos()&nbsp;{ &nbsp;&nbsp;</span></li>
<li class="alt"><span>width&nbsp;=&nbsp;document.documentElement.clientWidth; &nbsp;&nbsp;</span></li>
<li><span>height&nbsp;=&nbsp;document.documentElement.clientHeight; &nbsp;&nbsp;</span></li>
<li class="alt"><span>Hoffset&nbsp;=&nbsp;img.offsetHeight; &nbsp;&nbsp;</span></li>
<li><span>Woffset&nbsp;=&nbsp;img.offsetWidth; &nbsp;&nbsp;</span></li>
<li class="alt"><span>img.style.left&nbsp;=&nbsp;xPos&nbsp;+&nbsp;document.documentElement.scrollLeft&nbsp;+&nbsp;</span><span class="string">&quot;px&quot;</span><span>; &nbsp;&nbsp;</span></li>
<li><span>img.style.top&nbsp;=&nbsp;yPos&nbsp;+&nbsp;document.documentElement.scrollTop&nbsp;+&nbsp;</span><span class="string">&quot;px&quot;</span><span>; &nbsp;&nbsp;</span></li>
<li class="alt"><span class="keyword">if</span><span>&nbsp;(yon)&nbsp;{ &nbsp;&nbsp;</span></li>
<li><span>yPos&nbsp;=&nbsp;yPos&nbsp;+&nbsp;step; &nbsp;&nbsp;</span></li>
<li class="alt"><span>}&nbsp;</span><span class="keyword">else</span><span>&nbsp;{ &nbsp;&nbsp;</span></li>
<li><span>yPos&nbsp;=&nbsp;yPos&nbsp;-&nbsp;step; &nbsp;&nbsp;</span></li>
<li class="alt"><span>} &nbsp;&nbsp;</span></li>
<li><span class="keyword">if</span><span>&nbsp;(yPos&nbsp;&lt;&nbsp;0)&nbsp;{ &nbsp;&nbsp;</span></li>
<li class="alt"><span>yon&nbsp;=&nbsp;1; &nbsp;&nbsp;</span></li>
<li><span>yPos&nbsp;=&nbsp;0; &nbsp;&nbsp;</span></li>
<li class="alt"><span>} &nbsp;&nbsp;</span></li>
<li><span class="keyword">if</span><span>&nbsp;(yPos&nbsp;&gt;=&nbsp;(height&nbsp;-&nbsp;Hoffset))&nbsp;{ &nbsp;&nbsp;</span></li>
<li class="alt"><span>yon&nbsp;=&nbsp;0; &nbsp;&nbsp;</span></li>
<li><span>yPos&nbsp;=&nbsp;(height&nbsp;-&nbsp;Hoffset); &nbsp;&nbsp;</span></li>
<li class="alt"><span>} &nbsp;&nbsp;</span></li>
<li><span class="keyword">if</span><span>&nbsp;(xon)&nbsp;{ &nbsp;&nbsp;</span></li>
<li class="alt"><span>xPos&nbsp;=&nbsp;xPos&nbsp;+&nbsp;step; &nbsp;&nbsp;</span></li>
<li><span>} &nbsp;&nbsp;</span></li>
<li class="alt"><span class="keyword">else</span><span>&nbsp;{ &nbsp;&nbsp;</span></li>
<li><span>xPos&nbsp;=&nbsp;xPos&nbsp;-&nbsp;step; &nbsp;&nbsp;</span></li>
<li class="alt"><span>} &nbsp;&nbsp;</span></li>
<li><span class="keyword">if</span><span>&nbsp;(xPos&nbsp;&lt;&nbsp;0)&nbsp;{ &nbsp;&nbsp;</span></li>
<li class="alt"><span>xon&nbsp;=&nbsp;1; &nbsp;&nbsp;</span></li>
<li><span>xPos&nbsp;=&nbsp;0; &nbsp;&nbsp;</span></li>
<li class="alt"><span>} &nbsp;&nbsp;</span></li>
<li><span class="keyword">if</span><span>&nbsp;(xPos&nbsp;&gt;=&nbsp;(width&nbsp;-&nbsp;Woffset))&nbsp;{ &nbsp;&nbsp;</span></li>
<li class="alt"><span>xon&nbsp;=&nbsp;0; &nbsp;&nbsp;</span></li>
<li><span>xPos&nbsp;=&nbsp;(width&nbsp;-&nbsp;Woffset); &nbsp;&nbsp;</span></li>
<li class="alt"><span>} &nbsp;&nbsp;</span></li>
<li><span>} &nbsp;&nbsp;</span></li>
<li class="alt"><span class="keyword">function</span><span>&nbsp;start()&nbsp;{ &nbsp;&nbsp;</span></li>
<li><span>img.visibility&nbsp;=&nbsp;</span><span class="string">&quot;visible&quot;</span><span>; &nbsp;&nbsp;</span></li>
<li class="alt"><span>interval&nbsp;=&nbsp;setInterval(</span><span class="string">&#8216;changePos()&#8217;</span><span>,&nbsp;delay); &nbsp;&nbsp;</span></li>
<li><span>} &nbsp;&nbsp;</span></li>
<li class="alt"><span>start();&nbsp;&nbsp;</span></li>
</ol>
</div>
<link href="http://www.yuwuxing.com/admin/FCKeditor/editor/plugins/highlighter/dp.SyntaxHighlighter/Styles/SyntaxHighlighter.css" type="text/css" rel="stylesheet" /></div>
<p>&nbsp;</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fchange-the-layout-css-for-different-resolution%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fmove-ad-code%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">根据访问者分辨率，自动调用不同版式CSS的代码</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fone-code-to-change-webpage-to-blackandwhite%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fmove-ad-code%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">举国同悲，一条CSS代码把网页变黑白</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fthe-css-priority%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fmove-ad-code%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">详解CSS的优先权（ZT）</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2Fbuilt-sexy-css%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fmove-ad-code%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">译文:创建性感的CSS（ZT）</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.yuwuxing.com%2F20-beautiful-ajax-css-table%2F&from=http%3A%2F%2Fwww.yuwuxing.com%2Fmove-ad-code%2F">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">20 个漂亮的 Ajax + CSS 表格</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://www.yuwuxing.com/move-ad-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

