<?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>庆亮的博客-webgame架构 &#187; getComputedStyle</title>
	<atom:link href="http://www.qingliangcn.com/tag/getcomputedstyle/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.qingliangcn.com</link>
	<description>关注LAMP&#124;PHP源代码分析&#124;web架构&#124;PHP扩展&#124;Erlang&#124;服务端架构</description>
	<lastBuildDate>Fri, 10 Jun 2011 04:10:10 +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>Javascript 修改与获得style</title>
		<link>http://www.qingliangcn.com/2009/06/javascript-%e4%bf%ae%e6%94%b9%e4%b8%8e%e8%8e%b7%e5%be%97style/</link>
		<comments>http://www.qingliangcn.com/2009/06/javascript-%e4%bf%ae%e6%94%b9%e4%b8%8e%e8%8e%b7%e5%be%97style/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 09:49:24 +0000</pubDate>
		<dc:creator>庆亮</dc:creator>
				<category><![CDATA[HTML/CSS/JS]]></category>
		<category><![CDATA[currentStyle]]></category>
		<category><![CDATA[getComputedStyle]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[style]]></category>

		<guid isPermaLink="false">http://www.nd21.com/?p=80</guid>
		<description><![CDATA[当我们不使用框架时,&#160;经常使用如下的方法修改某个元素的样式. document.getElementById(&#39;test&#39;).style.color&#160;=&#160;&#39;red&#39;; document.getElementById(&#39;test&#39;).style.left&#160;&#160;=&#160;&#39;15px&#39;; 基本上每个css属性,&#160;javascript都有一个对应的style键名对应,&#160;如&#160;top,&#160;font,&#160;对于css中的带有&#160;-&#160;的属性如font-size等,&#160;则改成驼峰命名式即可.&#160;例: document.getElementById(&#39;test&#39;).style.fontSize&#160;=&#160;&#39;14px&#39;; 记住,&#160;写上px这样的单位是个好习惯,&#160;因为在某些css模式下,&#160;不写单位,&#160;浏览器会因为不知道具体的单位标准而不做任何事情. 在读取时,&#160;使用style属性就不见得一定有用了.&#160;如下面的两端代码: 代码一: &#60;script&#160;type=&#34;text/javascript&#34;&#62; alert(document.getElementById(&#39;test&#39;).sytle.left); &#60;/script&#62; &#60;style&#160;type=&#34;text/css&#34;&#62; #test&#160;{left:&#160;10px;&#160;position:absolute;} &#60;/style&#62; 代码二: &#60;html&#62; &#60;head&#62; &#60;meta&#160;http-equiv=&#34;Content-Type&#34;&#160;content=&#34;text/html;&#160;charset=iso-8859-1&#34;&#62; &#60;title&#62;Untitled&#160;Document&#60;/title&#62; &#60;script&#160;type=&#34;text/javascript&#34;&#62; alert(document.getElementById(&#39;test&#39;).sytle.left); &#60;/script&#62; &#60;/head&#62; &#60;body&#62; &#60;div&#160;id=&#34;test&#34;&#160;style=&#34;left:10px;&#160;position:absolute;&#34;&#62;&#60;/div&#62; &#60;/body&#62; &#60;/html&#62; 第一段代码弹出空,&#160;第二段代码弹出10px. 那么如果需要读取一个元素的某些属性呢,&#160;如margin,&#160;left等呢?&#160;有两种方式:&#160; 1.&#160;currentStyle(IE&#160;Only)&#160;&#160; 2.&#160;window.getComputedStyle()&#160;[W3C标准,&#160;&#160;Mozilla和Opera支持]. 代码一: document.getElementById(&#39;test&#39;).currentStyle.left; 代码二: var&#160;x&#160;=&#160;document.getElementById(&#39;test&#39;); alert(window.getComputedStyle(x,null).color); 更多内容请参考&#60;&#60;ppk谈JavaScript&#62;&#62;]]></description>
			<content:encoded><![CDATA[<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: '宋体'; font-size: 10pt; mso-spacerun: 'yes'">当我们不使用框架时<font face="Times New Roman">,&nbsp;</font><font face="宋体">经常使用如下的方法修改某个元素的样式</font><font face="Times New Roman">.</font></span><span style="font-family: '宋体'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: '宋体'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">document</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">.</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">getElementById</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">(</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,92,0); font-size: 10pt; mso-spacerun: 'yes'">&#39;test&#39;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">).</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">style</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">.</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">color</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); font-size: 10pt; mso-spacerun: 'yes'">&nbsp;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">=</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); font-size: 10pt; mso-spacerun: 'yes'">&nbsp;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,92,0); font-size: 10pt; mso-spacerun: 'yes'">&#39;red&#39;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">;</span><span style="font-family: 'Courier New'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">document</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">.</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">getElementById</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">(</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,92,0); font-size: 10pt; mso-spacerun: 'yes'">&#39;test&#39;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">).</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">style</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">.</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">left</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); font-size: 10pt; mso-spacerun: 'yes'">&nbsp;&nbsp;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">=</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); font-size: 10pt; mso-spacerun: 'yes'">&nbsp;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,92,0); font-size: 10pt; mso-spacerun: 'yes'">&#39;15px&#39;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: '宋体'; font-size: 10pt; mso-spacerun: 'yes'">基本上每个<font face="Times New Roman">css</font><font face="宋体">属性</font><font face="Times New Roman">,&nbsp;javascript</font><font face="宋体">都有一个对应的</font><font face="Times New Roman">style</font><font face="宋体">键名对应</font><font face="Times New Roman">,&nbsp;</font><font face="宋体">如&nbsp;</font><font face="Times New Roman">top,&nbsp;font,&nbsp;</font><font face="宋体">对于</font><font face="Times New Roman">css</font><font face="宋体">中的带有&nbsp;</font><font face="Times New Roman">-&nbsp;</font><font face="宋体">的属性如</font><font face="Times New Roman">font-size</font><font face="宋体">等</font><font face="Times New Roman">,&nbsp;</font><font face="宋体">则改成驼峰命名式即可</font><font face="Times New Roman">.&nbsp;</font><font face="宋体">例</font><font face="Times New Roman">:</font></span><span style="font-family: '宋体'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; text-indent: 36pt; margin-bottom: 0pt"><span style="font-family: '宋体'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">document</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">.</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">getElementById</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">(</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,92,0); font-size: 10pt; mso-spacerun: 'yes'">&#39;test&#39;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">).</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">style</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">.</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">fontSize</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); font-size: 10pt; mso-spacerun: 'yes'">&nbsp;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">=</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); font-size: 10pt; mso-spacerun: 'yes'">&nbsp;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,92,0); font-size: 10pt; mso-spacerun: 'yes'">&#39;14px&#39;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">;</span><span style="font-family: '宋体'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; text-indent: 36pt; margin-bottom: 0pt"><span style="font-family: '宋体'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: '宋体'; font-size: 10pt; mso-spacerun: 'yes'">记住<font face="Times New Roman">,&nbsp;</font><font face="宋体">写上</font><font face="Times New Roman">px</font><font face="宋体">这样的单位是个好习惯</font><font face="Times New Roman">,&nbsp;</font><font face="宋体">因为在某些</font><font face="Times New Roman">css</font><font face="宋体">模式下</font><font face="Times New Roman">,&nbsp;</font><font face="宋体">不写单位</font><font face="Times New Roman">,&nbsp;</font><font face="宋体">浏览器会因为不知道具体的单位标准而不做任何事情</font><font face="Times New Roman">.</font></span><span style="font-family: '宋体'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="text-align: left; margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: '宋体'; font-size: 10pt; mso-spacerun: 'yes'">在读取时<font face="Times New Roman">,&nbsp;</font><font face="宋体">使用</font><font face="Times New Roman">style</font><font face="宋体">属性就不见得一定有用了</font><font face="Times New Roman">.&nbsp;</font><font face="宋体">如下面的两端代码</font><font face="Times New Roman">:</font></span><span style="font-family: '宋体'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="text-align: left; margin-top: 0pt; text-indent: 36pt; margin-bottom: 0pt"><span style="font-family: '宋体'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="text-align: left; margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: '宋体'; font-size: 10pt; mso-spacerun: 'yes'">代码一<font face="Times New Roman">:</font></span><span style="font-family: '宋体'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,255); font-size: 10pt; mso-spacerun: 'yes'">&lt;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(163,21,21); font-size: 10pt; mso-spacerun: 'yes'">script</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); font-size: 10pt; mso-spacerun: 'yes'">&nbsp;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(255,0,0); font-size: 10pt; mso-spacerun: 'yes'">type</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">=</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,255); font-size: 10pt; mso-spacerun: 'yes'">&quot;text/javascript&quot;&gt;</span><span style="font-family: 'Courier New'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">alert</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">(</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">document</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">.</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">getElementById</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">(</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,92,0); font-size: 10pt; mso-spacerun: 'yes'">&#39;test&#39;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">).</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">sytle</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">.</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">left</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">);</span><span style="font-family: 'Courier New'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,255); font-size: 10pt; mso-spacerun: 'yes'">&lt;/</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(163,21,21); font-size: 10pt; mso-spacerun: 'yes'">script</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,255); font-size: 10pt; mso-spacerun: 'yes'">&gt;</span><span style="font-family: 'Courier New'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,255); font-size: 10pt; mso-spacerun: 'yes'">&lt;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(163,21,21); font-size: 10pt; mso-spacerun: 'yes'">style</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); font-size: 10pt; mso-spacerun: 'yes'">&nbsp;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(255,0,0); font-size: 10pt; mso-spacerun: 'yes'">type</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">=</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,255); font-size: 10pt; mso-spacerun: 'yes'">&quot;text/css&quot;&gt;</span><span style="font-family: 'Courier New'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(163,21,21); font-size: 10pt; mso-spacerun: 'yes'">#test</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); font-size: 10pt; mso-spacerun: 'yes'">&nbsp;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; font-weight: bold; mso-spacerun: 'yes'">{</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(163,21,21); font-size: 10pt; mso-spacerun: 'yes'">left</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; font-weight: bold; mso-spacerun: 'yes'">:</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); font-size: 10pt; mso-spacerun: 'yes'">&nbsp;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,255); font-size: 10pt; mso-spacerun: 'yes'">10px</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; font-weight: bold; mso-spacerun: 'yes'">;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); font-size: 10pt; mso-spacerun: 'yes'">&nbsp;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(163,21,21); font-size: 10pt; mso-spacerun: 'yes'">position</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; font-weight: bold; mso-spacerun: 'yes'">:</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(163,21,21); font-size: 10pt; mso-spacerun: 'yes'">absolute</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; font-weight: bold; mso-spacerun: 'yes'">;}</span><span style="font-family: 'Courier New'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="text-align: left; margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,255); font-size: 10pt; mso-spacerun: 'yes'">&lt;/</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(163,21,21); font-size: 10pt; mso-spacerun: 'yes'">style</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,255); font-size: 10pt; mso-spacerun: 'yes'">&gt;</span><span style="font-family: '宋体'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="text-align: left; margin-top: 0pt; text-indent: 36pt; margin-bottom: 0pt"><span style="font-family: '宋体'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="text-align: left; margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: '宋体'; font-size: 10pt; mso-spacerun: 'yes'">代码二<font face="Times New Roman">:</font></span><span style="font-family: '宋体'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,255); font-size: 10pt; mso-spacerun: 'yes'">&lt;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(163,21,21); font-size: 10pt; mso-spacerun: 'yes'">html</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,255); font-size: 10pt; mso-spacerun: 'yes'">&gt;</span><span style="font-family: 'Courier New'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,255); font-size: 10pt; mso-spacerun: 'yes'">&lt;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(163,21,21); font-size: 10pt; mso-spacerun: 'yes'">head</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,255); font-size: 10pt; mso-spacerun: 'yes'">&gt;</span><span style="font-family: 'Courier New'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,255); font-size: 10pt; mso-spacerun: 'yes'">&lt;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(163,21,21); font-size: 10pt; mso-spacerun: 'yes'">meta</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); font-size: 10pt; mso-spacerun: 'yes'">&nbsp;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(255,0,0); font-size: 10pt; mso-spacerun: 'yes'">http-equiv</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">=</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,255); font-size: 10pt; mso-spacerun: 'yes'">&quot;Content-Type&quot;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); font-size: 10pt; mso-spacerun: 'yes'">&nbsp;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(255,0,0); font-size: 10pt; mso-spacerun: 'yes'">content</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">=</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,255); font-size: 10pt; mso-spacerun: 'yes'">&quot;text/html;&nbsp;charset=iso-8859-1&quot;&gt;</span><span style="font-family: 'Courier New'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,255); font-size: 10pt; mso-spacerun: 'yes'">&lt;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(163,21,21); font-size: 10pt; mso-spacerun: 'yes'">title</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,255); font-size: 10pt; mso-spacerun: 'yes'">&gt;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">Untitled&nbsp;Document</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,255); font-size: 10pt; mso-spacerun: 'yes'">&lt;/</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(163,21,21); font-size: 10pt; mso-spacerun: 'yes'">title</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,255); font-size: 10pt; mso-spacerun: 'yes'">&gt;</span><span style="font-family: 'Courier New'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,255); font-size: 10pt; mso-spacerun: 'yes'">&lt;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(163,21,21); font-size: 10pt; mso-spacerun: 'yes'">script</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); font-size: 10pt; mso-spacerun: 'yes'">&nbsp;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(255,0,0); font-size: 10pt; mso-spacerun: 'yes'">type</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">=</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,255); font-size: 10pt; mso-spacerun: 'yes'">&quot;text/javascript&quot;&gt;</span><span style="font-family: 'Courier New'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">alert</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">(</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">document</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">.</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">getElementById</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">(</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,92,0); font-size: 10pt; mso-spacerun: 'yes'">&#39;test&#39;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">).</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">sytle</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">.</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">left</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">);</span><span style="font-family: 'Courier New'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,255); font-size: 10pt; mso-spacerun: 'yes'">&lt;/</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(163,21,21); font-size: 10pt; mso-spacerun: 'yes'">script</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,255); font-size: 10pt; mso-spacerun: 'yes'">&gt;</span><span style="font-family: 'Courier New'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,255); font-size: 10pt; mso-spacerun: 'yes'">&lt;/</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(163,21,21); font-size: 10pt; mso-spacerun: 'yes'">head</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,255); font-size: 10pt; mso-spacerun: 'yes'">&gt;</span><span style="font-family: 'Courier New'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,255); font-size: 10pt; mso-spacerun: 'yes'">&lt;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(163,21,21); font-size: 10pt; mso-spacerun: 'yes'">body</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,255); font-size: 10pt; mso-spacerun: 'yes'">&gt;</span><span style="font-family: 'Courier New'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,255); font-size: 10pt; mso-spacerun: 'yes'">&lt;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(163,21,21); font-size: 10pt; mso-spacerun: 'yes'">div</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); font-size: 10pt; mso-spacerun: 'yes'">&nbsp;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(255,0,0); font-size: 10pt; mso-spacerun: 'yes'">id</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">=</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,255); font-size: 10pt; mso-spacerun: 'yes'">&quot;test&quot;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); font-size: 10pt; mso-spacerun: 'yes'">&nbsp;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(255,0,0); font-size: 10pt; mso-spacerun: 'yes'">style</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">=&quot;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(163,21,21); font-size: 10pt; mso-spacerun: 'yes'">left</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; font-weight: bold; mso-spacerun: 'yes'">:</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,255); font-size: 10pt; mso-spacerun: 'yes'">10px</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; font-weight: bold; mso-spacerun: 'yes'">;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); font-size: 10pt; mso-spacerun: 'yes'">&nbsp;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(163,21,21); font-size: 10pt; mso-spacerun: 'yes'">position</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; font-weight: bold; mso-spacerun: 'yes'">:</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(163,21,21); font-size: 10pt; mso-spacerun: 'yes'">absolute</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; font-weight: bold; mso-spacerun: 'yes'">;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">&quot;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,255); font-size: 10pt; mso-spacerun: 'yes'">&gt;&lt;/</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(163,21,21); font-size: 10pt; mso-spacerun: 'yes'">div</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,255); font-size: 10pt; mso-spacerun: 'yes'">&gt;</span><span style="font-family: 'Courier New'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,255); font-size: 10pt; mso-spacerun: 'yes'">&lt;/</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(163,21,21); font-size: 10pt; mso-spacerun: 'yes'">body</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,255); font-size: 10pt; mso-spacerun: 'yes'">&gt;</span><span style="font-family: 'Courier New'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="text-align: left; margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,255); font-size: 10pt; mso-spacerun: 'yes'">&lt;/</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(163,21,21); font-size: 10pt; mso-spacerun: 'yes'">html</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,255); font-size: 10pt; mso-spacerun: 'yes'">&gt;</span><span style="font-family: '宋体'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="text-align: left; margin-top: 0pt; text-indent: 36pt; margin-bottom: 0pt"><span style="font-family: '宋体'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="text-align: left; margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: '宋体'; font-size: 10pt; mso-spacerun: 'yes'">第一段代码弹出空<font face="Times New Roman">,&nbsp;</font><font face="宋体">第二段代码弹出</font><font face="Times New Roman">10px.</font></span><span style="font-family: '宋体'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; text-indent: 36pt; margin-bottom: 0pt"><span style="font-family: '宋体'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: '宋体'; font-size: 10pt; mso-spacerun: 'yes'">那么如果需要读取一个元素的某些属性呢<font face="Times New Roman">,&nbsp;</font><font face="宋体">如</font><font face="Times New Roman">margin,&nbsp;left</font><font face="宋体">等呢</font><font face="Times New Roman">?&nbsp;</font><font face="宋体">有两种方式</font><font face="Times New Roman">:&nbsp;</font></span><span style="font-family: '宋体'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: '宋体'; font-size: 10pt; mso-spacerun: 'yes'">1.&nbsp;currentStyle(IE&nbsp;Only)&nbsp;&nbsp;</span><span style="font-family: '宋体'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: '宋体'; font-size: 10pt; mso-spacerun: 'yes'">2.&nbsp;window.getComputedStyle()&nbsp;[W3C<font face="宋体">标准</font><font face="Times New Roman">,&nbsp;&nbsp;</font></span><span style="font-family: 'Times New Roman'; font-size: 10pt; mso-spacerun: 'yes'">Mozilla<font face="宋体">和</font><font face="Times New Roman">Opera</font><font face="宋体">支持</font></span><span style="font-family: '宋体'; font-size: 10pt; mso-spacerun: 'yes'">].</span><span style="font-family: '宋体'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: '宋体'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: '宋体'; font-size: 10pt; mso-spacerun: 'yes'">代码一<font face="Times New Roman">:</font></span><span style="font-family: '宋体'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">document</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">.</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">getElementById</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">(</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,92,0); font-size: 10pt; mso-spacerun: 'yes'">&#39;test&#39;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">).</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">currentStyle</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">.</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">left</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">;</span><span style="font-family: '宋体'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: '宋体'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: '宋体'; font-size: 10pt; mso-spacerun: 'yes'">代码二<font face="Times New Roman">:</font></span><span style="font-family: '宋体'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,192); font-size: 10pt; font-weight: bold; mso-spacerun: 'yes'">var</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); font-size: 10pt; mso-spacerun: 'yes'">&nbsp;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">x</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); font-size: 10pt; mso-spacerun: 'yes'">&nbsp;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">=</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); font-size: 10pt; mso-spacerun: 'yes'">&nbsp;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">document</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">.</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">getElementById</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">(</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,92,0); font-size: 10pt; mso-spacerun: 'yes'">&#39;test&#39;</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">);</span><span style="font-family: 'Courier New'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">alert</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">(</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">window</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">.</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">getComputedStyle</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">(</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">x</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">,</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(128,0,64); font-size: 10pt; mso-spacerun: 'yes'">null</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">).</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(0,0,0); font-size: 10pt; mso-spacerun: 'yes'">color</span><span style="font-family: 'Courier New'; background: rgb(255,255,255); color: rgb(92,92,92); font-size: 10pt; mso-spacerun: 'yes'">);</span><span style="font-family: 'Times New Roman'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: 'Times New Roman'; font-size: 10pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-family: '宋体'; font-size: 10pt; mso-spacerun: 'yes'">更多内容请参考</span><span><a href="http://book.csdn.net/bookfiles/679"><span class="15" style="font-family: '宋体'; color: rgb(0,0,255); font-size: 10pt; text-decoration: underline; mso-spacerun: 'yes'">&lt;&lt;</span><span class="15" style="font-family: 'Times New Roman'; color: rgb(0,0,255); font-size: 10pt; text-decoration: underline; mso-spacerun: 'yes'">ppk<font face="宋体">谈</font><font face="Times New Roman">JavaScript</font></span><span class="15" style="font-family: '宋体'; color: rgb(0,0,255); font-size: 10pt; text-decoration: underline; mso-spacerun: 'yes'">&gt;&gt;</span></a></span></p>
<p><!--EndFragment--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.qingliangcn.com/2009/06/javascript-%e4%bf%ae%e6%94%b9%e4%b8%8e%e8%8e%b7%e5%be%97style/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>


