<?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/"
		>
<channel>
	<title>Comments on: Javascript作用域原理</title>
	<atom:link href="http://www.laruence.com/2009/05/28/863.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.laruence.com/2009/05/28/863.html</link>
	<description>PHP语言, PHP扩展, Zend引擎相关的研究,技术,新闻分享 - 左手代码 右手诗</description>
	<lastBuildDate>Thu, 09 Feb 2012 12:31:57 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
	<item>
		<title>By: wkylin</title>
		<link>http://www.laruence.com/2009/05/28/863.html/comment-page-1#comment-5410</link>
		<dc:creator>wkylin</dc:creator>
		<pubDate>Sat, 19 Nov 2011 05:36:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=863#comment-5410</guid>
		<description>__parent__你确定是这个吗？？</description>
		<content:encoded><![CDATA[<p>__parent__你确定是这个吗？？</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 雪候鸟</title>
		<link>http://www.laruence.com/2009/05/28/863.html/comment-page-1#comment-5191</link>
		<dc:creator>雪候鸟</dc:creator>
		<pubDate>Mon, 24 Oct 2011 02:43:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=863#comment-5191</guid>
		<description>@henry fixed, thanks :)</description>
		<content:encoded><![CDATA[<p>@henry fixed, thanks <img src='http://www.laruence.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: xdf</title>
		<link>http://www.laruence.com/2009/05/28/863.html/comment-page-1#comment-5182</link>
		<dc:creator>xdf</dc:creator>
		<pubDate>Sun, 23 Oct 2011 07:31:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=863#comment-5182</guid>
		<description>factory函数返回undefined</description>
		<content:encoded><![CDATA[<p>factory函数返回undefined</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 袖之欢</title>
		<link>http://www.laruence.com/2009/05/28/863.html/comment-page-1#comment-5178</link>
		<dc:creator>袖之欢</dc:creator>
		<pubDate>Sat, 22 Oct 2011 08:29:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=863#comment-5178</guid>
		<description>想请问一下,为什么从factory函数返回以后,仍然是&quot;intro:undefined&quot;呢~~</description>
		<content:encoded><![CDATA[<p>想请问一下,为什么从factory函数返回以后,仍然是&#8221;intro:undefined&#8221;呢~~</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 小哥</title>
		<link>http://www.laruence.com/2009/05/28/863.html/comment-page-1#comment-4818</link>
		<dc:creator>小哥</dc:creator>
		<pubDate>Sat, 27 Aug 2011 17:15:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=863#comment-4818</guid>
		<description>请问一下，那这个执行函数才会创建的活动对象是不是就是指 ‘上下文’？</description>
		<content:encoded><![CDATA[<p>请问一下，那这个执行函数才会创建的活动对象是不是就是指 ‘上下文’？</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: raintree</title>
		<link>http://www.laruence.com/2009/05/28/863.html/comment-page-1#comment-4651</link>
		<dc:creator>raintree</dc:creator>
		<pubDate>Fri, 29 Jul 2011 02:28:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=863#comment-4651</guid>
		<description>要是能用普通的定义和解释方式多好啊</description>
		<content:encoded><![CDATA[<p>要是能用普通的定义和解释方式多好啊</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: henry</title>
		<link>http://www.laruence.com/2009/05/28/863.html/comment-page-1#comment-4650</link>
		<dc:creator>henry</dc:creator>
		<pubDate>Thu, 28 Jul 2011 23:57:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=863#comment-4650</guid>
		<description>并将func的[[scope]]属性所指向的,定义func时候的顶级活动对象, 加入到scope china.

一个小拼写错误：scope china 应该是 scope chain</description>
		<content:encoded><![CDATA[<p>并将func的[[scope]]属性所指向的,定义func时候的顶级活动对象, 加入到scope china.</p>
<p>一个小拼写错误：scope china 应该是 scope chain</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 雪候鸟</title>
		<link>http://www.laruence.com/2009/05/28/863.html/comment-page-1#comment-4067</link>
		<dc:creator>雪候鸟</dc:creator>
		<pubDate>Wed, 30 Mar 2011 06:56:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=863#comment-4067</guid>
		<description>@小哥 没明白你的问题, 你是问t2的作用域和t1的作用域连的关系?</description>
		<content:encoded><![CDATA[<p>@小哥 没明白你的问题, 你是问t2的作用域和t1的作用域连的关系?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 小哥</title>
		<link>http://www.laruence.com/2009/05/28/863.html/comment-page-1#comment-4053</link>
		<dc:creator>小哥</dc:creator>
		<pubDate>Tue, 29 Mar 2011 13:02:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=863#comment-4053</guid>
		<description>鸟哥，看了5、6遍，有些地方不明白，不知道能不能帮我解答下。

function t1(){
   function t2(){
     
   }
}

像这样形式的函数,定义t2函数的时候是在函数t1里面，那是不是t1的[[scope]]是连接到t1的作用域里面？如果不是，那是连接到window下？</description>
		<content:encoded><![CDATA[<p>鸟哥，看了5、6遍，有些地方不明白，不知道能不能帮我解答下。</p>
<p>function t1(){<br />
   function t2(){</p>
<p>   }<br />
}</p>
<p>像这样形式的函数,定义t2函数的时候是在函数t1里面，那是不是t1的[[scope]]是连接到t1的作用域里面？如果不是，那是连接到window下？</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 豪情</title>
		<link>http://www.laruence.com/2009/05/28/863.html/comment-page-1#comment-4003</link>
		<dc:creator>豪情</dc:creator>
		<pubDate>Thu, 24 Mar 2011 06:23:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=863#comment-4003</guid>
		<description>帅哥，你的变量名也就罢了，方法名太不容易理解了。
app,echo，让不熟悉php的朋友很难记住。
为何不用简单的sayName and sayHello 来实例呢？</description>
		<content:encoded><![CDATA[<p>帅哥，你的变量名也就罢了，方法名太不容易理解了。<br />
app,echo，让不熟悉php的朋友很难记住。<br />
为何不用简单的sayName and sayHello 来实例呢？</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 作用域内的似有成员 都存放在哪？ - Web开发常见问题 - [标签:tags] - 开源网 &#124; 123Doing</title>
		<link>http://www.laruence.com/2009/05/28/863.html/comment-page-1#comment-3808</link>
		<dc:creator>作用域内的似有成员 都存放在哪？ - Web开发常见问题 - [标签:tags] - 开源网 &#124; 123Doing</dc:creator>
		<pubDate>Tue, 08 Mar 2011 18:06:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=863#comment-3808</guid>
		<description>[...] http://www.laruence.com/2009/05/28/863.html [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://www.laruence.com/2009/05/28/863.html" rel="nofollow">http://www.laruence.com/2009/05/28/863.html</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: （经典）关于Javascript之this关键字 &#8211; 爱网络,爱前端</title>
		<link>http://www.laruence.com/2009/05/28/863.html/comment-page-1#comment-3800</link>
		<dc:creator>（经典）关于Javascript之this关键字 &#8211; 爱网络,爱前端</dc:creator>
		<pubDate>Tue, 08 Mar 2011 01:51:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=863#comment-3800</guid>
		<description>[...] 如我之前的文章所述(Javascript作用域), 定义在全局的函数, 函数的所有者就是当前页面, 也就是window对象. [...]</description>
		<content:encoded><![CDATA[<p>[...] 如我之前的文章所述(Javascript作用域), 定义在全局的函数, 函数的所有者就是当前页面, 也就是window对象. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: （经典）关于Javascript之this关键字(转) &#124; 梦三秋</title>
		<link>http://www.laruence.com/2009/05/28/863.html/comment-page-1#comment-3762</link>
		<dc:creator>（经典）关于Javascript之this关键字(转) &#124; 梦三秋</dc:creator>
		<pubDate>Thu, 03 Mar 2011 15:22:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=863#comment-3762</guid>
		<description>[...] 如我之前的文章所述(Javascript作用域), 定义在全局的函数, 函数的所有者就是当前页面, 也就是window对象. [...]</description>
		<content:encoded><![CDATA[<p>[...] 如我之前的文章所述(Javascript作用域), 定义在全局的函数, 函数的所有者就是当前页面, 也就是window对象. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: narco</title>
		<link>http://www.laruence.com/2009/05/28/863.html/comment-page-1#comment-3284</link>
		<dc:creator>narco</dc:creator>
		<pubDate>Wed, 29 Sep 2010 03:13:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=863#comment-3284</guid>
		<description>拜读^_^</description>
		<content:encoded><![CDATA[<p>拜读^_^</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wxl</title>
		<link>http://www.laruence.com/2009/05/28/863.html/comment-page-1#comment-3265</link>
		<dc:creator>Wxl</dc:creator>
		<pubDate>Tue, 21 Sep 2010 03:09:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=863#comment-3265</guid>
		<description>受教了
顺道请教个问题
怎么访问私有的 活动变量？
比如
函数内的活动变量   应该存放在一个集合里吧

function a(){
    
    
    var test = &#039;test&#039;;
    
    function _get(name){
        return name;
    }
    
    return function(){
        
        _get(&quot;test&quot;);
    }
}()</description>
		<content:encoded><![CDATA[<p>受教了<br />
顺道请教个问题<br />
怎么访问私有的 活动变量？<br />
比如<br />
函数内的活动变量   应该存放在一个集合里吧</p>
<p>function a(){</p>
<p>    var test = &#8216;test&#8217;;</p>
<p>    function _get(name){<br />
        return name;<br />
    }</p>
<p>    return function(){</p>
<p>        _get(&#8220;test&#8221;);<br />
    }<br />
}()</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: palgerrard</title>
		<link>http://www.laruence.com/2009/05/28/863.html/comment-page-1#comment-2544</link>
		<dc:creator>palgerrard</dc:creator>
		<pubDate>Sun, 02 May 2010 17:17:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=863#comment-2544</guid>
		<description>研究的很深入！非常感谢你的分享~</description>
		<content:encoded><![CDATA[<p>研究的很深入！非常感谢你的分享~</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 马克龙</title>
		<link>http://www.laruence.com/2009/05/28/863.html/comment-page-1#comment-2305</link>
		<dc:creator>马克龙</dc:creator>
		<pubDate>Tue, 10 Nov 2009 04:57:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=863#comment-2305</guid>
		<description>：）受教了</description>
		<content:encoded><![CDATA[<p>：）受教了</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://www.laruence.com/2009/05/28/863.html/comment-page-1#comment-2276</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Mon, 19 Oct 2009 09:55:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=863#comment-2276</guid>
		<description>好文</description>
		<content:encoded><![CDATA[<p>好文</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 雪候鸟</title>
		<link>http://www.laruence.com/2009/05/28/863.html/comment-page-1#comment-2202</link>
		<dc:creator>雪候鸟</dc:creator>
		<pubDate>Tue, 08 Sep 2009 08:19:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=863#comment-2202</guid>
		<description>@jindw 这个是因为var和function定义在预编译的时候被提前. 而var提前只是占位,计算留在后面执行的过程.
所以第一次xxx是function, 到第二个的时候, xxx被var  xxx=123给改写成了123.</description>
		<content:encoded><![CDATA[<p>@jindw 这个是因为var和function定义在预编译的时候被提前. 而var提前只是占位,计算留在后面执行的过程.<br />
所以第一次xxx是function, 到第二个的时候, xxx被var  xxx=123给改写成了123.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jindw</title>
		<link>http://www.laruence.com/2009/05/28/863.html/comment-page-1#comment-2200</link>
		<dc:creator>jindw</dc:creator>
		<pubDate>Tue, 08 Sep 2009 07:18:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=863#comment-2200</guid>
		<description>还有更多看起来很离谱的事情呢。
比如：

function test(xxx){
   alert(xxx)
   var xxx = 123;
   function xxx(){
   }
   alert(xxx)
}
test(444);

输出的是 function,123

函数调用的时候，scope关系好像是这样的：

enter argumentMap;
enter functionMap;
enter varMap;
apply();
exitScope();



function 编译的时候，首先被声明，他升值</description>
		<content:encoded><![CDATA[<p>还有更多看起来很离谱的事情呢。<br />
比如：</p>
<p>function test(xxx){<br />
   alert(xxx)<br />
   var xxx = 123;<br />
   function xxx(){<br />
   }<br />
   alert(xxx)<br />
}<br />
test(444);</p>
<p>输出的是 function,123</p>
<p>函数调用的时候，scope关系好像是这样的：</p>
<p>enter argumentMap;<br />
enter functionMap;<br />
enter varMap;<br />
apply();<br />
exitScope();</p>
<p>function 编译的时候，首先被声明，他升值</p>
]]></content:encoded>
	</item>
</channel>
</rss>

