<?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>╭╰Original　Colors╯╮ - 认真工作 &#187; 浏览器宽高</title>
	<atom:link href="http://www.iros.me/tag/%e6%b5%8f%e8%a7%88%e5%99%a8%e5%ae%bd%e9%ab%98/feed" rel="self" type="application/rss+xml" />
	<link>http://www.iros.me</link>
	<description>show the colorsssssss in my WORK</description>
	<lastBuildDate>Fri, 09 Sep 2011 06:29:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>时隔好~久，终于又完成一个WP站，简洁最高！~ 浏览器宽高数据读取的JS方法汇总</title>
		<link>http://www.iros.me/new-wordpress-website-mareen.html</link>
		<comments>http://www.iros.me/new-wordpress-website-mareen.html#comments</comments>
		<pubDate>Fri, 14 Aug 2009 08:56:24 +0000</pubDate>
		<dc:creator>ponytail</dc:creator>
				<category><![CDATA[┨Dooooitmyself]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Jquery]]></category>
		<category><![CDATA[mareen]]></category>
		<category><![CDATA[onload]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[浏览器宽高]]></category>

		<guid isPermaLink="false">http://www.originalcolors.cn/work/?p=513</guid>
		<description><![CDATA[Object-C倒腾一个月我已经基本放弃了&#124;&#124;&#124; 然后密集的写了近2个周的商城，要吐血，中间有时间就是折腾这个站当是放松，这两天空一点总算把它“半”完成了，如果说只有做这种东西才能有乐趣的话我还真得考虑自己以后要怎么走下去了呢。。。 做这个的时候走了不少弯路，要好好反省一下&#124;&#124;&#124; Mareen 网站原型在 这里 ，效果超棒！~ 页面的加载效果超级想学来做的，因为那边用的是prototype，看见那个complete我就有点晕了，网上狂找jquery的图片加载完成用法，未果，于是就转而用基本的onload，在FF里还好，到了IE里面却没效果，研究半天发现&#60;img src=&#8221;ooxx.jpg&#8221; onload=&#8221;ooxx()&#8221; /&#62;是没办法实现的，要把onload放src前面才行，问题我后台只写了&#60;img src=&#8221;ooxx.jpg&#8221; /&#62;其他东西都是jquery另外塞进的，没办法排顺序&#124;&#124;&#124; 结果浪费了不知道多少时间调整结构啊JS啥的，却被别人告诉原来用jquery的load函数就可以了，真是要郁闷到内伤了，但是考虑整体结构要在这个例子里再使用这个效果还是比较麻烦，最开始的时候没考虑进去，so，放弃。。。 还有另外一个内容随浏览器大小改变而改变竖直方向定位的问题，监控浏览器可见区域高度的时候怎么测试都不对，不是数值固定不变就是拉大浏览器反而数值变小了，最后最后最后，才发现原来这个和页面顶部的W3C标准设置及浏览器兼容都有关系。下面是找到的资料，记录一下 &#60;script&#62; function getInfo() { var s = &#8220;&#8221;; s += &#8221; 网页可见区域宽：&#8221;+ document.body.clientWidth; s += &#8221; 网页可见区域高：&#8221;+ document.body.clientHeight; s += &#8221; 网页可见区域宽：&#8221;+ document.body.offsetWidth + &#8221; (包括边线和滚动条的宽)&#8221;; s += &#8221; 网页可见区域高：&#8221;+ document.body.offsetHeight + &#8221; (包括边线的宽)&#8221;; s += &#8221; 网页正文全文宽：&#8221;+ document.body.scrollWidth; s [...]<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="96" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="来体验一下Chrome Experiments，玩玩JS效果吧~" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.iros.me%2Fchrome-experiments-javascript.html&from=http%3A%2F%2Fwww.iros.me%2Fnew-wordpress-website-mareen.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #B0BF32 !important; width: 90px !important; height: 90px !important;" src="http://static.wumii.com/site_images/2011/09/09/29586944.png" width="90px" height="90px" /><br />
                        <font size="-1" color="#666666" style="display: block !important; line-height: 15px !important; width: 96px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">来体验一下Chrome Experiments，玩玩JS效果吧~</font>
                    </a>
                </td>
                <td width="96" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #B0BF32 !important;">
                    <a target="_blank" title="jQuery 常用方法一览" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.iros.me%2Fjquery-methods.html&from=http%3A%2F%2Fwww.iros.me%2Fnew-wordpress-website-mareen.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #B0BF32 !important; width: 90px !important; height: 90px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="90px" height="90px" /><br />
                        <font size="-1" color="#666666" style="display: block !important; line-height: 15px !important; width: 96px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">jQuery 常用方法一览</font>
                    </a>
                </td>
                <td width="96" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #B0BF32 !important;">
                    <a target="_blank" title="使用Wordpress搭建中小型展示网站，公司篇~~ 问题+插件汇总" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.iros.me%2Fwordpress-websites.html&from=http%3A%2F%2Fwww.iros.me%2Fnew-wordpress-website-mareen.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #B0BF32 !important; width: 90px !important; height: 90px !important;" src="http://static.wumii.com/site_images/2011/09/09/29583537.jpg" width="90px" height="90px" /><br />
                        <font size="-1" color="#666666" style="display: block !important; line-height: 15px !important; width: 96px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">使用Wordpress搭建中小型展示网站，公司篇~~ 问题+插件汇总</font>
                    </a>
                </td>
                <td width="96" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #B0BF32 !important;">
                    <a target="_blank" title="Wordpress 主题框架推荐，我自己爱用的 Sandbox WP 大集合~ 第16个新鲜出炉~~" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.iros.me%2Fwordpress-themes.html&from=http%3A%2F%2Fwww.iros.me%2Fnew-wordpress-website-mareen.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #B0BF32 !important; width: 90px !important; height: 90px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="90px" height="90px" /><br />
                        <font size="-1" color="#666666" style="display: block !important; line-height: 15px !important; width: 96px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Wordpress 主题框架推荐，我自己爱用的 Sandbox WP 大集合~ 第16个新鲜出炉~~</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" 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>Object-C倒腾一个月我已经基本放弃了||| 然后密集的写了近2个周的商城，要吐血，中间有时间就是折腾这个站当是放松，这两天空一点总算把它“半”完成了，如果说只有做这种东西才能有乐趣的话我还真得考虑自己以后要怎么走下去了呢。。。</p>
<p>做这个的时候走了不少弯路，要好好反省一下|||</p>
<p><a  href="http://www.originalcolors.cn/test/mareen/" target="_blank">Mareen</a></p>
<p><img src="http://www.originalcolors.cn/work/wp-content/plugins/pika/readimg.php?src=http%3A%2F%2Flh4.gouride.com%2F_SAtXNAuCabM%2FSoUbT50DyHI%2FAAAAAAAADhE%2F_SxvBXs7lWE%2Fs640%2Fmareen.jpg"  alt="" /></p>
<p><span id="more-513" ></span></p>
<p>网站原型在 <a  href="http://mareenfischinger.de/" target="_blank">这里</a> ，效果超棒！~ 页面的加载效果超级想学来做的，因为那边用的是prototype，看见那个complete我就有点晕了，网上狂找jquery的图片加载完成用法，未果，于是就转而用基本的onload，在FF里还好，到了IE里面却没效果，研究半天发现&lt;img src=&#8221;ooxx.jpg&#8221; onload=&#8221;ooxx()&#8221; /&gt;是没办法实现的，要把onload放src前面才行，问题我后台只写了&lt;img src=&#8221;ooxx.jpg&#8221; /&gt;其他东西都是jquery另外塞进的，没办法排顺序||| 结果浪费了不知道多少时间调整结构啊JS啥的，却被别人告诉原来用jquery的load函数就可以了，真是要郁闷到内伤了，但是考虑整体结构要在这个例子里再使用这个效果还是比较麻烦，最开始的时候没考虑进去，so，放弃。。。</p>
<p>还有另外一个内容随浏览器大小改变而改变竖直方向定位的问题，监控浏览器可见区域高度的时候怎么测试都不对，不是数值固定不变就是拉大浏览器反而数值变小了，最后最后最后，才发现原来这个和页面顶部的W3C标准设置及浏览器兼容都有关系。下面是找到的资料，记录一下</p>
<p>&lt;script&gt;<br/>
function getInfo()<br/>
{<br/>
var s = &#8220;&#8221;;<br/>
s += &#8221; 网页可见区域宽：&#8221;+ document.body.clientWidth;<br/>
s += &#8221; 网页可见区域高：&#8221;+ document.body.clientHeight;<br/>
s += &#8221; 网页可见区域宽：&#8221;+ document.body.offsetWidth + &#8221; (包括边线和滚动条的宽)&#8221;;<br/>
s += &#8221; 网页可见区域高：&#8221;+ document.body.offsetHeight + &#8221; (包括边线的宽)&#8221;;<br/>
s += &#8221; 网页正文全文宽：&#8221;+ document.body.scrollWidth;<br/>
s += &#8221; 网页正文全文高：&#8221;+ document.body.scrollHeight;<br/>
s += &#8221; 网页被卷去的高(ff)：&#8221;+ document.body.scrollTop;<br/>
s += &#8221; 网页被卷去的高(ie)：&#8221;+ document.documentElement.scrollTop;<br/>
s += &#8221; 网页被卷去的左：&#8221;+ document.body.scrollLeft;<br/>
s += &#8221; 网页正文部分上：&#8221;+ window.screenTop;<br/>
s += &#8221; 网页正文部分左：&#8221;+ window.screenLeft;<br/>
s += &#8221; 屏幕分辨率的高：&#8221;+ window.screen.height;<br/>
s += &#8221; 屏幕分辨率的宽：&#8221;+ window.screen.width;<br/>
s += &#8221; 屏幕可用工作区高度：&#8221;+ window.screen.availHeight;<br/>
s += &#8221; 屏幕可用工作区宽度：&#8221;+ window.screen.availWidth;<br/>
s += &#8221; 你的屏幕设置是 &#8220;+ window.screen.colorDepth +&#8221; 位彩色&#8221;;<br/>
s += &#8221; 你的屏幕设置 &#8220;+ window.screen.deviceXDPI +&#8221; 像素/英寸&#8221;;<br/>
//alert (s);<br/>
}<br/>
getInfo();<br/>
&lt;/script&gt;</p>
<p>网上找到的资料一般是给出上面这些获得方法，但是如果页面顶部W3C标准为<strong>transitional</strong>的话，即有&lt;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221; &#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8221;&gt;这样的标记的话</p>
<p>在IE中：<br/>
document.body.clientWidth ==&gt; BODY对象宽度<br/>
document.body.clientHeight ==&gt; BODY对象高度<br/>
document.documentElement.clientWidth ==&gt; 可见区域宽度<br/>
document.documentElement.clientHeight ==&gt; 可见区域高度<br/>
在FireFox中：<br/>
document.body.clientWidth ==&gt; BODY对象宽度<br/>
document.body.clientHeight ==&gt; BODY对象高度<br/>
document.documentElement.clientWidth ==&gt; 可见区域宽度<br/>
document.documentElement.clientHeight ==&gt; 可见区域高度<br/>
在Opera中：<br/>
document.body.clientWidth ==&gt; 可见区域宽度<br/>
document.body.clientHeight ==&gt; 可见区域高度<br/>
document.documentElement.clientWidth ==&gt; 页面对象宽度（即BODY对象宽度加上Margin宽）<br/>
document.documentElement.clientHeight ==&gt; 页面对象高度（即BODY对象高度加上Margin高）</p>
<p>而如果没有定义W3C的标准，则<br/>
IE为：<br/>
document.documentElement.clientWidth ==&gt; 0<br/>
document.documentElement.clientHeight ==&gt; 0<br/>
FireFox为：<br/>
document.documentElement.clientWidth ==&gt;<br/>
页面对象宽度（即BODY对象宽度加上Margin宽）document.documentElement.clientHeight ==&gt;<br/>
页面对象高度（即BODY对象高度加上Margin高）<br/>
Opera为：<br/>
document.documentElement.clientWidth ==&gt;<br/>
页面对象宽度（即BODY对象宽度加上Margin宽）document.documentElement.clientHeight ==&gt;<br/>
页面对象高度（即BODY对象高度加上Margin高）</p>
<blockquote><p>这两天公司招人，让我修改一下网站前端的招聘要求，就跑去看了看别家的，里面蛮多都要求读懂“JavaScript框架源码”，说实在jquery我也就是胡乱用用，完全没想过要读源码啊||| 半路出家JS基础都麽有的我是不是有功夫应该去看一下呢。。。</p></blockquote>
<table class="wumii-related-items"  cellspacing="0"  cellpadding="3"  border="0"  style="clear: both;" >
    
    <tr>
        <td colspan="4" ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;" >您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="96"  valign="top"  style="padding: 5px !important; margin: 0 !important;" >
                    <a  target="_blank" title="来体验一下Chrome Experiments，玩玩JS效果吧~" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.iros.me%2Fchrome-experiments-javascript.html&#038;from=http%3A%2F%2Fwww.iros.me%2Fnew-wordpress-website-mareen.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #B0BF32 !important; width: 90px !important; height: 90px !important;"  src="http://static.wumii.com/site_images/2011/09/09/29586944.png"  width="90px"  height="90px" /><br/>
                        <font size="-1"  color="#666666"  style="display: block !important; line-height: 15px !important; width: 96px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;" >来体验一下Chrome Experiments，玩玩JS效果吧~</font>
                    </a>
                </td>
                <td width="96"  valign="top"  style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #B0BF32 !important;" >
                    <a  target="_blank" title="jQuery 常用方法一览" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.iros.me%2Fjquery-methods.html&#038;from=http%3A%2F%2Fwww.iros.me%2Fnew-wordpress-website-mareen.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #B0BF32 !important; width: 90px !important; height: 90px !important;"  src="http://static.wumii.com/images/blogWidget/wordpress_default.gif"  width="90px"  height="90px" /><br/>
                        <font size="-1"  color="#666666"  style="display: block !important; line-height: 15px !important; width: 96px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;" >jQuery 常用方法一览</font>
                    </a>
                </td>
                <td width="96"  valign="top"  style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #B0BF32 !important;" >
                    <a  target="_blank" title="使用Wordpress搭建中小型展示网站，公司篇~~ 问题+插件汇总" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.iros.me%2Fwordpress-websites.html&#038;from=http%3A%2F%2Fwww.iros.me%2Fnew-wordpress-website-mareen.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #B0BF32 !important; width: 90px !important; height: 90px !important;"  src="http://static.wumii.com/site_images/2011/09/09/29583537.jpg"  width="90px"  height="90px" /><br/>
                        <font size="-1"  color="#666666"  style="display: block !important; line-height: 15px !important; width: 96px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;" >使用Wordpress搭建中小型展示网站，公司篇~~ 问题+插件汇总</font>
                    </a>
                </td>
                <td width="96"  valign="top"  style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #B0BF32 !important;" >
                    <a  target="_blank" title="Wordpress 主题框架推荐，我自己爱用的 Sandbox WP 大集合~ 第16个新鲜出炉~~" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.iros.me%2Fwordpress-themes.html&#038;from=http%3A%2F%2Fwww.iros.me%2Fnew-wordpress-website-mareen.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #B0BF32 !important; width: 90px !important; height: 90px !important;"  src="http://static.wumii.com/images/blogWidget/wordpress_default.gif"  width="90px"  height="90px" /><br/>
                        <font size="-1"  color="#666666"  style="display: block !important; line-height: 15px !important; width: 96px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;" >WordPress 主题框架推荐，我自己爱用的 Sandbox WP 大集合~ 第16个新鲜出炉~~</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4"  align="right" >
            <a  style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" 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>
	标签：<a href="http://www.iros.me/tag/javascript" title="Javascript" rel="tag">Javascript</a>, <a href="http://www.iros.me/tag/jquery" title="Jquery" rel="tag">Jquery</a>, <a href="http://www.iros.me/tag/mareen" title="mareen" rel="tag">mareen</a>, <a href="http://www.iros.me/tag/onload" title="onload" rel="tag">onload</a>, <a href="http://www.iros.me/tag/wordpress" title="Wordpress" rel="tag">Wordpress</a>, <a href="http://www.iros.me/tag/%e6%b5%8f%e8%a7%88%e5%99%a8%e5%ae%bd%e9%ab%98" title="浏览器宽高" rel="tag">浏览器宽高</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.iros.me/new-wordpress-website-mareen.html/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

