<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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:series="http://unfoldingneurons.com/"
		>
<channel>
	<title>Comments on: 关于JS变量声明的小细节</title>
	<atom:link href="http://www.mikkolee.com/120/feed" rel="self" type="application/rss+xml" />
	<link>http://www.mikkolee.com/120</link>
	<description>关于界面的价值观与方法论</description>
	<lastBuildDate>Sat, 04 Sep 2010 14:28:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: GreatGhoul</title>
		<link>http://www.mikkolee.com/120/comment-page-1#comment-411</link>
		<dc:creator>GreatGhoul</dc:creator>
		<pubDate>Thu, 29 Oct 2009 14:04:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikkolee.com/?p=120#comment-411</guid>
		<description>说实话,在看这篇文章之间,我从来没有见过这种错误.</description>
		<content:encoded><![CDATA[<p>说实话,在看这篇文章之间,我从来没有见过这种错误.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hax</title>
		<link>http://www.mikkolee.com/120/comment-page-1#comment-199</link>
		<dc:creator>hax</dc:creator>
		<pubDate>Sun, 15 Mar 2009 18:52:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikkolee.com/?p=120#comment-199</guid>
		<description>对于未定义变量，IE会报错的，你用try catch就可以抓到了。
属性不报错是合理的，因为它是动态语言。

最后那个例子，关键不在于block块，因为所有的var声明都会被提前处置。IE的特殊在于它的全局变量有DID（人格分裂症） ^_^

请看本篇blog：http://hax.javaeye.com/blog/349569</description>
		<content:encoded><![CDATA[<p>对于未定义变量，IE会报错的，你用try catch就可以抓到了。<br />
属性不报错是合理的，因为它是动态语言。</p>
<p>最后那个例子，关键不在于block块，因为所有的var声明都会被提前处置。IE的特殊在于它的全局变量有DID（人格分裂症） ^_^</p>
<p>请看本篇blog：http://hax.javaeye.com/blog/349569</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hax</title>
		<link>http://www.mikkolee.com/120/comment-page-1#comment-198</link>
		<dc:creator>hax</dc:creator>
		<pubDate>Sat, 14 Mar 2009 05:10:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikkolee.com/?p=120#comment-198</guid>
		<description>再测试一下：
&lt;script&gt;</description>
		<content:encoded><![CDATA[<p>再测试一下：<br />
&lt;script&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hax</title>
		<link>http://www.mikkolee.com/120/comment-page-1#comment-197</link>
		<dc:creator>hax</dc:creator>
		<pubDate>Sat, 14 Mar 2009 05:09:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikkolee.com/?p=120#comment-197</guid>
		<description>是不是因为带有标签？
</description>
		<content:encoded><![CDATA[<p>是不是因为带有标签？</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hax</title>
		<link>http://www.mikkolee.com/120/comment-page-1#comment-196</link>
		<dc:creator>hax</dc:creator>
		<pubDate>Sat, 14 Mar 2009 05:08:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikkolee.com/?p=120#comment-196</guid>
		<description>为什么评论写不上去？</description>
		<content:encoded><![CDATA[<p>为什么评论写不上去？</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kim Wang</title>
		<link>http://www.mikkolee.com/120/comment-page-1#comment-160</link>
		<dc:creator>Kim Wang</dc:creator>
		<pubDate>Wed, 04 Feb 2009 05:52:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikkolee.com/?p=120#comment-160</guid>
		<description>文章最后提到的alert(a); //undefined的原因是，javascript预编译所致~
 
if(false) {
     var a = &#039;Hello&#039;;
 }

javascript在执行代码会定义所有var声明的变量(但不会赋值,此时值是undefined)，在运行时才会给这个变量赋值...
若改成
if(true) {
     var a = &#039;Hello&#039;;
 }
alert(a)://会弹出Hello</description>
		<content:encoded><![CDATA[<p>文章最后提到的alert(a); //undefined的原因是，javascript预编译所致~</p>
<p>if(false) {<br />
     var a = &#8216;Hello&#8217;;<br />
 }</p>
<p>javascript在执行代码会定义所有var声明的变量(但不会赋值,此时值是undefined)，在运行时才会给这个变量赋值&#8230;<br />
若改成<br />
if(true) {<br />
     var a = &#8216;Hello&#8217;;<br />
 }<br />
alert(a)://会弹出Hello</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greco</title>
		<link>http://www.mikkolee.com/120/comment-page-1#comment-159</link>
		<dc:creator>Greco</dc:creator>
		<pubDate>Tue, 03 Feb 2009 01:36:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikkolee.com/?p=120#comment-159</guid>
		<description>你的blog设计的也一般
1. 分类、个人信息、评论都在下面
每次要看一个分类都要拖到最下面，麻烦
2. 页面右面那个页签，我一开始还以为只是装饰用的标尺
后来才发现，原来是页签</description>
		<content:encoded><![CDATA[<p>你的blog设计的也一般<br />
1. 分类、个人信息、评论都在下面<br />
每次要看一个分类都要拖到最下面，麻烦<br />
2. 页面右面那个页签，我一开始还以为只是装饰用的标尺<br />
后来才发现，原来是页签</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: z.Yleo77</title>
		<link>http://www.mikkolee.com/120/comment-page-1#comment-156</link>
		<dc:creator>z.Yleo77</dc:creator>
		<pubDate>Wed, 14 Jan 2009 11:28:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikkolee.com/?p=120#comment-156</guid>
		<description>我理解的未定义的变量报错，但未声明的属性不报错，是因为js默认他为undefined。</description>
		<content:encoded><![CDATA[<p>我理解的未定义的变量报错，但未声明的属性不报错，是因为js默认他为undefined。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 小麦</title>
		<link>http://www.mikkolee.com/120/comment-page-1#comment-150</link>
		<dc:creator>小麦</dc:creator>
		<pubDate>Sat, 10 Jan 2009 16:13:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikkolee.com/?p=120#comment-150</guid>
		<description>呃，怎么说呢，typeof没法区分出未定义和已经定义未赋值。不过这个方法是正确的，我一时忘记了，呵呵。已经在文中补上了。</description>
		<content:encoded><![CDATA[<p>呃，怎么说呢，typeof没法区分出未定义和已经定义未赋值。不过这个方法是正确的，我一时忘记了，呵呵。已经在文中补上了。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lion</title>
		<link>http://www.mikkolee.com/120/comment-page-1#comment-149</link>
		<dc:creator>Lion</dc:creator>
		<pubDate>Sat, 10 Jan 2009 07:42:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikkolee.com/?p=120#comment-149</guid>
		<description>检查有没有定义，标准的方法是
if (typeof(value_name) != &quot;undefined&quot;)</description>
		<content:encoded><![CDATA[<p>检查有没有定义，标准的方法是<br />
if (typeof(value_name) != &#8220;undefined&#8221;)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
