原文地址: http://www.cnblogs.com/xdp-gacl/p/3703876.html
闭包(closure)是Javascript语言的一个难点,也是它的特色, 很多高级应用都要依靠闭包实现。很早就接触过闭包这个概念了,但是一直糊里糊涂的,没有能够弄明白JavaScript的闭包到底是什么,有什么用,今天 在网上看到了一篇讲JavaScript闭包的文章(原文链接), 讲得非常好,这下算是彻底明白了JavaScript的闭包到底是个神马东东以及闭包的用途了,在此写出来和大家分享一下,希望不理解 JavaScript闭包的朋友们看了之后能够理解闭包!以下内容大部分是来自原文,我在原文的基础上加上一些代码注释和运行效果图以及少许的修改,方便 大家理解!
一、变量的作用域
要理解闭包,首先必须理解Javascript特殊的变量作用域。
在JavaScript中,变量的作用域分两种:全局变量和局部变量。
在Javascript中,在函数内部可以直接读取全局变量。
1 var n=999;//定义全局变量n
2 function f1(){
3 alert("在函数内部访问全局变量n,n="+n);//在函数内部访问全局变量n
4 }
5 f1(); //
运行结果:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAATMAAAC5CAIAAADLZk8DAAAgAElEQVR4nO2de1wTZ77/n+yees7p2Z5dd7ftnl9fv21P3aq0ardlPUixF05tqwgU5OBilf5eu6vRrezZbtXdLrYVSmu8AXWPHm0BqxJaKchFLgJBQa7hmnARkCAEyA0IIYSrykx+f0xmMpNMbpgMnOP3/fq8NCSZzGQy7/k+zzOTCaqpqcnPz79w4UJCQsKHH364fPWvqKxYs5bIyuf/7UEI9X7pK4HKM6u8IRDPJSoq6tChQ2fOnPnmm2/y8vJQXl5ecnLyiRMnVqxZ+9zzv0o6/830PeM8c/d/Saa4yqR17jiVCVfi5GtaLwxn64Hjz/feHL79rdfnFgfb33r9HoZ/9XWa1+oXn1nlvW/fvsTExIsXL6Lz58+fOHHiiSeXnUu9pJ3Cb+vwm8PmdFAZsRf6JG5P+/wy5Gza6NHgLbRIiahxqQqXqvBmtjRZRIk3KfFGZhqYqVfQg9VRGcTEZGrpGcBqyFQT6ceq+7EqMpXMUPcTTyMmoV6hdoDx4tQc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YCQCLETATABYjYCYALEYio8BMAFh8gJkAsBgBMwFgMQJmAsBiBMwEgMWIC2Z2a/FTF3Mio6IhEIinc+piTrcWd8rMegXercX7dBgEAvF0urV4vYLNTG9v76/Op1X3M+opBAJZkFT3Y1+dT/P29ka/+93vvFa/2D+28MsEgUD6xzCv1S8GBASgffv2PbPKO/l8WtsQ7um5QiAQO2kbwpPPpz2zyjsiIgLFx8e/9957jz/xZPL5tP4xrGZg4ZcPAnnQUj2A9Y9hyefTHn/iydDQ0H379qGkpCSBQPDee+89s8rba/WLX32dNj5rhEAgXOarr9O8Vr/4zCrv0NDQ999//5NPPkGXLl06c+aMQCDYs2fPtm3bnlnlDYFAuM/GjRu3bt36wQcffPLJJ8eOHfv/uqUz6VpcQrYAAAAASUVORK5CYII=" alt="" />
但是反过来则不行,在函数外部无法读取函数内的局部变量。
1 function f1(){
2 var n=999;//在f1函数内部定义局部变量n
3 }
4 alert("在函数外部访问局部变量n,n="+n); //在函数外部访问局部变量n,错误:n未定义
运行结果:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIIAAAATCAIAAADTW0JMAAABEUlEQVRYhe1USQ4DMQjL/1+bJ/RQqUoTsD3ZW+HTLGAcDEk5cAHSaQGBnMOGSxA2XIGw4QrYNqSUzNf24f1cYo3O3aAHUU6qd6PTBvpxJ+Z2ZC6n2BzXhs9opwZ9ldZhYss80IAqzKz7zAbQaJPo7KW0YhW8FMxDu4RyzQSwCuV3wCuWvxaDsvGdYcR3i8A+HUSfEuXCUWJKQvPZru5pAvpM6uPdL+GJ1NMVF8UAaaaBCJOlPKE4F/sxYkN5ajP9EbkoILaBJLYM3iB6bJ3bkOFEVCJovf32VKuszuN3ZDuI7S/M7LHZwVQT3YZH9X4F3kHoleWlE88oC758zHp/YAbd7HY66f6hXzM0B0YRNlyBF1osZSkZhtAOAAAAAElFTkSuQmCC" alt="" />
这里有一个地方需要注意,函数内部声明变量的时候,一定要使用var命令。如果不用的话,实际上是声明了一个全局变量!
1 function f1(){
2 n=999;
3 }
4 f1();
5 alert("n在f1函数内部没有使用var来声明,此时n就是一个全局变量,\r\n证明:n="+n+",window.n==n的结果是:"+(window.n==n));
运行结果:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAcIAAAC7CAIAAAB5IAmvAAAgAElEQVR4nO2deVwUZ57wq2c27m528+4n+85mZt983kk2mZg4uUPQdDCJbC41YiQMBk3IzL4bWzdhdjOjzjiYBF2irYlC3ImjieAFJCIoINAcDYJccndzI81N0zTQdDeHiEdXv39UV/VTVU9VVzc0oPy+n98nkT7qfOrbv+eop4iysrKMjIxTp05FRUXt2LFj8ZPPM/HoU75UPPb00oUQzP6iB4GJR57wgYCAgHjkCZ+wsLCIiIgjR458//336enpRHp6ekxMzIEDBx59yvfxp58/dvL7yZt2D+PGHRJXZysm+HFdUox7GmP8mPIwRu+48PhQ8I+qxydIYgHgl5xZK7SzfDHevEW+9+art+YH77356k0b+d2JhCVPPvfIEz5bt26Njo4+ffo0cfLkyQMHDtz/wMPH486YrpIdZrJpyBnNTAyLBfqVGY9Gz2JQajSgYSTrkNBSMUBqDaTWQNbiooYT/WRNP1nNjip2VOrRsFUw0Wcrp+MyGr22MjpKqeixlfbYSugopqOo2xmXmOiyXeqyFSJRQEWnraDTdpEd+Ux02PI7bHm4UDPRzopc4cgRCh0+sgVC6PNCyxfZJM7GMzuF3WXqaDAHh3PQqCNJHVX0OFNHnjkR6NlhThlzEqlzSp1f5nRf7mWVBKZ4VPQ5i02l3oaWKE5h4xRFqnxyCi22YGuoGMCE1p2oQ8PodpgnyQ2vrxjSarsvpPalp+ozUvUZqYaMVGNGqjEjZTgjxZSRYs5IsWSkWDNSrBnnxjLOjWecmxCIcd6fY5nnrJnnrJkplswUc2aKKTNlODPFmJlizEw1ZKbqM1P1mal9Gand6alDddoNr6+wXCPbR0jTVTLm1Pc/vf8ByqTEV1999ctnl52IO9M/hqhzmGweJluGyZZhspUJk0AMeytaPIshZzRLC4evEavWU0Gdyw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QAAmBagUQAAgGkBGgUAAJgWoFEAAIBpARoFAACYFm5otM1EfnM6NTQsHAICAgKCiW9Op7aZSEkardSTbSayy2yDgICAgGCizURW6nEa9fHx+e5kQmkPK1OFgICAgBCP0h7bdycTfHx8iH//939f8uRzPZa53yYICAiI2yh6LLYlTz63evVqYuvWrY884RNzMqFhkPT2WiEgICDujGgYJGNOJjzyhE9ISAhx8ODBjz766Kf3PxBzMqHHYivrnfvtg4CAgJi3Udpr67HYYk4m/PT+BwIDA7du3UocO3ZMqVR+9NFHjzzhs+TJ5747kTA6ZYeAgICAwMZ3JxKWPPncI0/4BAYGfvLJJ59//jlx5syZI0eOKJXKLVu2bNiw4ZEnfCAgICAgRGLlypXr16///e9///nnn3/55Zf/H33c1NndkwVoAAAAAElFTkSuQmCC" alt="" />
二、如何从外部读取局部变量?
出于种种原因,我们有时候需要得到函数内的局部变量。但是,前面已经说过了,正常情况下,这是办不到的,只有通过变通方法才能实现。
那就是在函数的内部,再定义一个函数。
1 function f1(){
2 var n=999;//f1函数内部的局部变量n
3 //在f1函数内部定义一个f2函数
4 function f2(){
5 //在f2函数内部是可以访问局部变量n的
6 alert(n); // 999
7 }
8 }
在上面的代码中,函数f2就被包括在函数f1内部,这时f1内部的所有局部变量,对f2都是可见的。但是反过来就不行,f2内部的局部变量,对 f1 就是不可见的。这就是Javascript语言特有的"链式作用域"结构(chain scope),子对象会一级一级地向上寻找所有父对象的变量。所以,父对象的所有变量,对子对象都是可见的,反之则不成立。既然f2可以读取f1中的局部 变量,那么只要把f2作为返回值,我们不就可以在f1外部读取它的内部变量了吗!或许有人会有疑问,f2是一个函数啊,怎么能够作为f1函数的返回值返回 呢,其实是可以的,JavaScript中的函数名本身就是变量,所以函数也可以当作普通变量来使用。也就是说,不仅可以像传递参数一样把一个函数传递给另一个函数,而且可以将一个函数作为另一个函数的返回值返回。
1 function f1(){
2 var n=999;//局部变量n
3 //在f1函数内部声明的f2函数
4 function f2(){
5 alert(n);
6 }
7
8 return f2;//将f2函数作为f1函数的返回值
9 }
10 var result=f1();//f1调用完后的返回值是一个f2函数,此时result就是f2函数
11 result(); // 999,调用f2函数
运行结果:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJoAAAC5CAIAAABfpbHYAAAgAElEQVR4nO3ce1hTd54/8G+mW2emu/3t09lO2/n12baj9TbVdpRhkWJVtmoVgUIZELRxdn9T0Wo621adsUGrLGpqVZRZWbUkeCG0UCIXIRBIgAgEgQQS7pCEewgh94S7mm9+f5zk5CQEBCt6gufzvB+f5FzIMa/zPddvDqisrMzLy7t+/Xp8fPzhw4eXrPwDmqVveyNZ9s6/PQ1B/7/YLwHN4hVeOAyFQjl27NilS5e+//773NxckJubS6fTz549u/Rt77fe+UPSte9H71kfMnfnc+7dhzs/eP8+PmrnB+/fs8DvrqYuX7l68QqvAwcOnD9//saNG+DatWtnz5599fVFySlp2hHYoYfNakda0GimC3aWR56mh8vgtJl6lkZMGpCoYIMKGkZh1KYNaomk+1Z2X262Ii9bkZetzMtW5WWr8rI0eVnavCx9XpYhL8uYl2XMu2nOuzmUd3N4igxNemtm3zSybxrZWQZ2lp6dpWVnadhZKnaWip2tZGcr2NkKdnZfXnZ3bra6XhK1aYNhDMp1UDsC6de/f/nV1xFRcObMmd+t8rmaktZvxhBqYIsGtmpgqwa2odFOEc1cpfXhonakZVKwY5HpHeulyzrk7GoYgxHvb1CJarszM7ozM3ozM/oyMxRZ6cqsdFVWujorXZOdrs1ON2SnG+0xzybG7HRjTroxJ92Qk67NSdfkpKuz01XZ6crsdEV2el9WRm9WRndWRndWhqq2NuL9DYYx27IpTJB+LRVpo2D//v2rvN/VjdoUHYRa2K6F7Voo1UKpDkp1UOYuUu1cpf3honFkqrUEOw06I7pqtjpvclBXwxgM91+rqq6Wp6V2paV2p6X2pqX2/Ziq+DF14MdUVQZTlcHUZDC1GUx9BtPAYhpZTCMrxTxFjKwUk/NbI4tpYDH1LKaWxdSwmCoWU8ViDmSkKjJS+zJSe9NTu9N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IgkdALbxG5qO30uFqy+TbpOMjwrzsIpOWV44hQPi1vamlqfrohb2taJZ8YpIzhxn0fHKcMX53t1Q7VNrQ3NLU9Vapta36sbmimnbCpOGR45hQ3NksanK8KG5tlxyiZzyhzjughOj+OUTcHJwRPn2lpzTX2TuOHpSk1909pa80w4OR7EGRZfuLZcvaNWUyVpeKqyo1aztlz9wI6ZD+bk4Ikzmdfol8D3q1D71ZqerlSo/RL4D+w2jXBypuLk4NjYbZgAAAFZSURBVIzTaDQmcRtCz3Ke+K8MHnNCz3KSuA3TfzNYTs5kTg4uOYmaqlw4OQSnRxeZ4JxPRXDOqyI451URnPOqCM55VQTnvCoyheCcR0VwzqsiOOdVEZzzqgjOeVUE57yqWXBKtfDijWwyhUoEt7l4I1uqhTPirFFAqRZ26S1EcBupFtYo3HF6eXl9dy1V0OPUcol4VgQ9lu+upXp5eYE///nPy1eu7jE8+WUi8tDpMViWr1wdEBAADhw4sHiFF/1aauMgnOtPJTIXaRyE9Gupi1d4RUZGgnPnzu3bt+/lV1+nX0vtMVgqe5/88hGZYQS9lh6DhX4t9eVXXw8NDT1w4ABISkqi0Wj79u1bvMJr+crV311NNY1biXhEvruaunzl6sUrvEJDQz///POvv/4apKWlXbp0iUaj7d27NyoqavEKLyIelC1btkRERHz55Zdff/31t99++/8B4PtJe0LM7EkAAAAASUVORK5CYII=" alt="" />
三、闭包的概念
上一节代码中的f2函数,就是闭包。各种专业文献上的"闭包"(closure)定义非常抽象,比如有这样的一个闭包定义:"JavaScript闭包就是在另一个作用域中保存了一份它从上一级函数或者作用域得到的变量,而这些变量是不会随上一级函数的执行完成而销毁",对于这样的闭包定义,我是很难看懂。我的理解是,闭包就是能够读取其他函数内部变量的函数。由于在Javascript语言中,只有函数内部的子函数才能读取局部变量,因此可以把闭包简单理解成"定义在一个函数内部的函数"。所以,在本质上,闭包就是将函数内部和函数外部连接起来的一座桥梁。
四、闭包的用途
闭包可以用在许多地方。它的最大用处有两个,一个是前面提到的可以读取函数内部的变量,另一个就是让这些变量的值始终保持在内存中。
怎么来理解这句话呢?请看下面的代码。
1 function f1(){
2 var n=999;
3 //nAdd是一个没有使用var声明的全局变量,这个变量现在指向了在f1函数内部声明的一个匿名函数
4 nAdd=function(){n+=1}
5 function f2(){
6 alert(n);
7 }
8 return f2;
9 }
10
11 var result=f1();//result就是f2函数
12 result();//第一次调用result函数 999
13 nAdd();//nAdd代表的就是在f1函数内部声明的一个匿名函数,nAdd()就是在调用匿名函数
14 result();//第二次调用result函数 1000
运行结果:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJoAAAC5CAIAAABfpbHYAAAgAElEQVR4nO3ceVxTZ74/8CddnJne29/9tbfTdsbftB2tC1XbKqWIuDFVqwgUZKCgjc69U9HWdG5bdcYGNy5ialWUuXK1kuBCaEUiixAIJAgCQSBAwo5hhxBC9oVNJU9+f5zk5CQEBCt4guf7+rx4hbOQw3mf5+QsTw4oKSnJzMy8cuVKdHT0gQMH5i/5AM2Cd92QLHzvw6ch6P+LXQlo5i12xWEoFMqRI0fOnz//008/ZWRkgIyMDDqdfurUqQXvui1674O4yz8NPjA9Yu7P5DwYgds+/mgEH7Xt448eGOHFS4kuS5bNW+y6d+/eM2fOXL16FVy+fPnUqVOz35wbn3BNOQBb1bBebk0DGsV4wc7y2FP3aOkbN2PPUotJDRIZrJFBzSAMXb9WLhJ13EzrzkiTZKZJMtOkmWmyzDRZZqoiM1WZmarOTNVkpmozU7WZN/SZNwyZN/rHiGHUr3r2DS37hpadqmGnqtmpSnaqgp0qY6fK2GlSdpqEnSZhp3VnpnVkpMmrRaHr12qGYIsKKgcg/cpPr81+ExEFJ0+efGep+6WEaz16DKECNihgowI2KmATGuUYUUxVGh8tcmsaRgU7Fpneul3abUO2rpohGPzRWllFZUdKckdKcldKcndKsiQ1SZqaJEtNkqcmKdKSlGlJmrQkrSX6yUSblqRNT9KmJ2nSk5TpSYr0JHlakiwtSZqWJElL6k5N7kpN7khN7khNllVWBn+0VjNkXja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VfJ6VE8VYm+q1zLmxungOC0+jw6ToGVcXIno9qUJV1DT1Wi2pRruZNz5RTMxCmwOs413MmINkVxh/ypSkSbYs28OAXTOQWmcd0Ep81xCmbgZFkX50RYy1ChQPZUJaxlaA13Yi6cLBvi9IrMW1mm/rhx7Kdm+VOVjxvHVqKsXJAAAAGCSURBVJap79sx8/6cLGvivFLQtCG6ZCVH/Vb9xFOVlRz1huiS+3abRjhZM3GyrIxTpVLFsRs9w1lP/FcGjzme4aw4duPsnwyWkzWdk2WVnETNVGacLILTpotMcC6mIjgXVRGci6oIzkVVBOeiKoJzURXZn+BcREVwLqoiOBdVEZyLqgjORVUE56KqeXDy5fBiYgbZP4CI1eZiYgZfDufEWS2CfDnsVuiIWG34clgtssRpZ2d3OSGZ04truURsK5xe3eWEZDs7O/D555+vXruhV/nkl4nIA6dXqVu9doOLiws4duzY8jV21ITkpkG40O9KZCHSNAipCcnL19jt27cPREREfPXVVy+/+jo1IblXqSvve/LLR2SO4fTpepU6akLyy6++7unpeezYMRAXF0ehUL766qvla+xWr91w+WqyWqsnYhO5fDV59doNy9fYeXp6fvPNNz/++CO4ceNGbGwshUI5cuSIr6/v8jV2RGwoO3fu9PHx+e6773788ceffvrp/wOLmD0F8V5VUQAAAABJRU5ErkJggg==" alt="" />
在这段代码中,result实际上就是闭包f2函数。它一共运行了两次,第一次的值是999,第二次的值是1000。这证明了,函数f1中的局部变量n一直保存在内存中,并没有在f1调用后被自动清除。
为什么会这样呢?原因就在于f1是f2的父函数,而f2被赋给了一个全局变量,这导致f2始终在内存中,而f2的存在依赖于f1,因此f1也始终在内存中,不会在调用结束后,被垃圾回收机制(garbage collection)回收。
这段代码中另一个值得注意的地方,就是"nAdd=function(){n+=1}"这一行,首先在nAdd前面没有使用var关键字,因此 nAdd是一个全局变量,而不是局部变量。其次,nAdd的值是一个匿名函数(anonymous function),而这个匿名函数本身也是一个闭包,所以nAdd相当于是一个setter,可以在函数外部对函数内部的局部变量进行操作。
五、使用闭包的注意点
1)由于闭包会使得函数中的变量都被保存在内存中,内存消耗很大,所以不能滥用闭包,否则会造成网页的性能问题,在IE中可能导致内存泄露。解决方法是,在退出函数之前,将不使用的局部变量全部删除。
2)闭包会在父函数外部,改变父函数内部变量的值。所以,如果你把父函数当作对象(object)使用,把闭包当作它的公用方法(Public Method),把内部变量当作它的私有属性(private value),这时一定要小心,不要随便改变父函数内部变量的值。
六、思考题
如果能理解下面两段代码的运行结果,应该就算理解闭包的运行机制了。
代码片段一:
1 var name = "The Window";
2 var object = {
3 name : "My Object",
4 getNameFunc : function(){
5 return function(){
6 return this.name;
7 };
8 }
9 };
10 alert(object.getNameFunc()());
运行结果:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAL8AAAC5CAIAAAD20XlMAAAgAElEQVR4nO3deVhTZ6I/8Dczt860dzrzdMZuvz637ei4MHVpi4qUtpZbaxWBQikUl3RupxW9bWamHXXGwbbK0BKtCtLK1ZaACqEViSxCIBAQBMIaSNgxIAQISSAhG7uSN78/zsnJOVkwIEFneL/P96HZcySfvmcPoKKiIicn5+LFi9HR0YcOHVq+eh3RFWvWY125dsNCKPHvJf8SiC5b5Y7KYDCOHDly9uzZH374ITs7G2RnZ7NYrJMnT65Ys/65teviL/wwdts0y976N+movc7zNNyegrvefH3q/siuN1+/bYTfn09xW/3islXu+/fvj4mJSUpKAhcuXDh58uRTzyxNTL6kHoU3NbBl0NJWoqrpSn7KnLd5dh1wtk3kKmEDqWKsitm0gVzljKsZgzveeG1QLJZezezLzpTlZMpyMuU5mcqcTGVOhionQ52TocnJ0OZk6HIydDlXDDlXhnOujDjosM1VA/eKjntFx83QcjM03Aw1N0PFzVByM5TcTDk3U8bNlHEz+3IypdmZgw3iHW+8ph2HnUNQPQpZF394/KlnMEDgxIkTv3/B43zypX4DSYwKtqpgmwq2qWA7UbWDqlzVttl10NJW54ozJWFqxHrXjGZtSDMGQ15/TSmsk6anSdPTetPT+tLTZBmp8oxUZUbqYEaqKjNVnZmqzUz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sodFdVRt27dGhIS8te//vWLL774+uuv/z/x3leF5fFbigAAAABJRU5ErkJggg==" alt="" />
代码片段二:
1 var name = "The Window";
2 var object = {
3 name : "My Object",
4 getNameFunc : function(){
5 var that = this;
6 return function(){
7 return that.name;
8 };
9 }
10 };
11 alert(object.getNameFunc()());
运行结果:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAALMAAAC5CAIAAADs7ZnCAAAgAElEQVR4nO3de1gTd74/8G92T93dntPfebq/3e7ur8/ZdnW90KrdlrJAaWs5tVYRKMhC8ZLu01bRVfZsK9p1oVYo1Yhyka4crSQoElopkYskEEgQBAIBAgl3DAgBkkkgIYSEm0Amvz8mmcwkAYFycZl5P5/Hh0xuY74vPnMPoLKyks1mp6amxsfHnzp1asOWV9HauNUFqU0v/ZEIhf5/sR8CWus3O6/uCg0NPXPmzJUrV7799tu8vDyQl5dHp9NjY2M3bnV58aVXk298OzZlWmBNkjWnmpqG97/79vTjkf3vvj1lhK9dT3fa8sr6zc5hYWEJCQk3b94EN27ciI2Nffa5dSlptzSj8AMt3DJgrVa01LMV9imLXs0Lq/65VhO2VHAjphqQUppLYqkGbKnmXdoxeO87bw1IJLI7OX15OXJ2jpydA7FzVOwcFTtbzc7WsLO17OwhdraOna1j39azbxvYt0dmKIPdTT3nto5zW8fJHuJkaznZGk62mpOt4mSrODkQJ0fOyZFzcvrYObK8nIEGyd533hoahzsHYc0oTE/99lfPPofgABcvXnzhZdfrabcUeowGNdyqhtvUcJsabkdLM0Opl6raFlYD1mqdW5kJ9sMtNlwcEfnhPrRjcNDbb6lEdbKsTFlWZm9WZl9Wpjw7A8rOUGVnDGRnqHMyNDkZQzkZOkvp51O6nAxdboYuN2MoN0OTm6HOzRjIyVDlZEA5GfKcjL7szN7sTFl2piw7U1VXF/T2W0Pj5v+vfBim30hHOgc4duzYyy6vDY6ZQVg1aOD7Gvi+BpZqYOkgLB2EOxyVVLNUdX9hpbbWfBW2qvFWUCJ2Pn4gDu0YHOj5uk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5wkc5bRMZOMjtUsY5NkOrLdwO8aJlT9uaBp07xkdNjL6LDe171KZfy5oGnFh2qZK7LdMG8ZHTPI4K5WGeKpL1r1hZ06QhWV07hJPDUXGVxiygiIL1xXof+I23i6Vf8Rr504/wY0Tayr0D/yqoJHy+CuUhkp/KaXE8vWCQwbxVOEqnUCw8uJZY+8EgmRwZ1JBnf1ytDpdMm8Rv9Y7opfTrjM5R/LTeY1zv7JYGVw7WVwV7sMMjPFRgaXlEEGCSmDjOOQMsg4DpWUQcZhSBlkHIeUQcZxSBlkHIcaSsog4yikDDKOQ8og4zikDDKOQ8og4zikDDKOMw8ZUg18+WYONTScLCLU5Zs5Ug08Jxk1cliqgbu1RrKIUFINXCN3JMPZ2fnajXRBD66fkEXYEvQYr91Id3Z2Bh9//LHTlld6hlZ+nsh6HKpnyOi05RUvLy8QFha2frMz/UZ6Uz+81O9K1mNeTf0w/Ub6+s3OwcHBIC4u7ujRo7969jn6jfSeIWNl78rPH1nLX4JeY8+QkX4j/VfPPufv7x8WFgaSk5NpNNrRo0fXb3Z22vLKtevpwxMmsohW166nO215Zf1mZ39//08++eSLL74At27dunLlCo1GO3LkyN69e9dvdiaLmLVz586goKDjx49/8cUXFy5c+P9zz31Uzz/pOwAAAABJRU5ErkJggg==" alt="" />
下面给代码加上注释,分析上述两个代码片段的运行结果:
代码片段一:
分析如下:
1 /*
2 在JavaScript中,我们声明的JavaScript全局对象、全局函数以及全局变量均自动成为window对象的成员。
3 全局变量是window对象的属性。
4 全局函数是window对象的方法。
5 */
6 var name = "The Window";//声明一个全局变量name,此时这个全局变量name就自动成为了window对象的一个属性
7 //证明:
8 alert("window.name:"+window.name);//能用window.name(对象名.属性名)的形式去访问name,那么就证明了这个全局变量name就自动成为了window对象的一个属性
9 //声明全局对象object,此时这个全局变量object就自动成为了window对象的一个属性
10 var object = {
11 name : "My Object",//object对象的属性name
12 getNameFunc : function(){//object对象的getNameFunc函数
13 //object对象的getNameFunc方法的返回值是一个匿名函数
14 return function(){
15 //此时这个this指的是哪个对象呢,指的是window对象,哪个对象调用this所在的函数,this指的就是哪个对象。
16 //证明匿名函数里面的this代表的是window对象而不是object
17 alert("this==object的结果是:"+(this==object));
18 alert("this==window的结果是:"+(this==window));
19 return this.name;//既然this代表的是window对象,那么this.name访问的自然就是window对象的名字"The Window"
20 };
21 }
22 };
23 //证明:全局对象object是window对象的一个属性
24 alert("window.object:"+window.object);
25 alert("window.object.name:"+window.object.name);
26 /*
27 调用完getNameFunc方法后,返回一个匿名方法,
28 此时retFn代表的就是匿名方法,现在相当于给匿名方法起了一个名字叫retFn,
29 此时的retFn函数自动成为了window对象的一个函数
30 */
31 var retFn = object.getNameFunc();
32 alert(retFn());//调用返回的匿名方法,那么是谁在调用这个匿名方法呢?是window对象
33 //证明:retFn函数是window对象的一个函数
34 alert("window.retFn():"+window.retFn());//能用window.retFn()(对象名.方法名)的形式去调用retFn方法,那么就证明了retFn函数是window对象的一个函数
代码片段二:
分析如下:
1 var name = "The Window";//全局变量name
2 //全局对象object
3 var object = {
4 name : "My Object",
5
6 getNameFunc : function(){
7 /*
8 此时这个this代表的是哪个对象呢,this此时代表的是object对象,哪个对象调用this所在的函数,this指的就是哪个对象
9 执行完that = this后,此时that也代表object对象
10 */
11 var that = this;//that是在getNameFunc函数里面声明的一个局部变量
12 //证明getNameFunc函数里面的this代表的是object对象而不是window
13 alert("this==object的结果是:"+(this==object));
14 alert("this==window的结果是:"+(this==window));
15 //证明that代表的是object对象
16 alert("that==object的结果是:"+(that==object));
17 return function(){
18 /*that是在getNameFunc函数里面声明的一个局部变量,
19 正常情况下getNameFunc函数调用完成后,that这个局部变量就会被JavaScript的GC回收,释放掉that这个局部变量所占用的内存空间,
20 但是现在that却能一直正常使用,没有被回收,
21 原因就在于getNameFunc是这个匿名函数的父函数,而getNameFunc函数调用完后会将这个匿名函数返回并被赋给了一个全局变量retFn,这导致匿名函数始终在内存中,
22 而匿名函数的存在依赖于getNameFunc函数,因此getNameFunc函数也始终在内存中,不会在调用结束后,被垃圾回收机制(garbage collection)回收。
23 既然getNameFunc函数始终在内存中,那么在getNameFunc函数内部声明的that局部变量在内存中也会一直存在,既然存在,那么当然可以继续使用了。
24 */
25 return that.name;//that代表的是object对象,那么that.name访问的自然就是object对象的名字"My Object"
26 };
27
28 }
29
30 };
31 var retFn = object.getNameFunc();//调用完getNameFunc方法后,返回一个匿名方法,此时retFn代表的就是匿名方法,现在相当于给匿名方法起了一个名字叫retFn
32 alert(retFn());
最后也附上一个我以前学习JavaScript闭包时写的一个例子:
1 <script type="text/javascript">
2 function A(){
3 var i = 0;//声明在A函数内部的局部变量i
4 //声明在A函数的内部的子函数b
5 function b(){
6 alert("i = "+(++i));//在子函数b内部访问声明在A函数内部的局部变量i
7 }
8 return b;//返回b这个函数的地址
9 }
10 /*
11 在执行完var c = A()后,变量c实际上是指向了函数b,b中用到了变量i,
12 再执行c()后会弹出一个窗口显示i的值(第一次为1),
13 这段代码其实就是创建了一个闭包,
14 因为函数a外的变量c引用了函数a内部的函数b
15 也就是说:当函数a的内部函数b被函数a外的一个变量引用的时候,
16 就创建了一个所谓的"闭包"
17 闭包的作用就是在a执行完并返回后,
18 闭包使得JavaScript的垃圾回收机制GC不会收回a所占用的资源,
19 因为a的内部函数b的执行需要依赖a中的变量
20 */
21 A();//此时内存中肯定会有i的空间,当执行完A()之后,GC就会回收为i分配的内存空间
22 var c = A();//这种用法,GC不会把i当成垃圾处理掉
23 c();//相当于调用b(),结果是:i=1
24 c();//结果是:i=2
25 c();//结果是:i=3
26 </script>
运行结果:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJoAAAC5CAIAAABfpbHYAAAgAElEQVR4nO3de1wTZ74/8Cftqbvbc/o7r+6v23aP7dpqvWu7ynIQqRe2XhCBgiw3bdxzflsvVbqnrbprQ61yUKMVUfbI0UrijWChRC5CIJBwEQhyCSTcMeFOCCH3BBBQ8uT3xySTSUgQ1ECC83l9X5pkZsgw73kmc3kygLKysqysrJs3b8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s2s2zi48csZ0qEu6VU9UQpK5C+PsmsnZZZvWhyfOkI9pPyQAAAHESURBVGTuI39+lzgxHeoFc3bNwsnFE+erwqlzbaPFXconKn+8WvCqcGo+nFwX4gyKLVxdofskjRPdNkpOL31y/v1j88TqCt09B2bem5OLJ84kfstrcWWrBbpXGqeeqKwW6F6LK7vnsGmEkzsbJxdnnFqtNoHXHBjDfeSfMljiBMZwE3jNcz8zWE7uTE4uLjmJmq0cOLkEp0sXmeB8nIrgfKyK4HysiuB8rIrgfKyK4HysikwhOB+jIjgfqyI4H6siOB+rIjgfqyI4H6taAKdYBS+lsMkUKhHc5lIKW6yC8+KslUKxCvapTURwG7EK1kqdcbq5uX2XnCYYsOtcIq4VwYDpu+Q0Nzc38MEHH6xd/9qA5tGvE5H7zoDGtHb9az4+PuDo0aMr17nRk9NaRuBiPyqRxUjLCKQnp61c5xYaGgrOnz//8ccf//KFF+nJaQMaU+Xgo18/IvOMYNA0oDHRk9N++cKLgYGBR48eBQkJCTQa7eOPP165zm3t+te+u5qmM5qJuES+u5q2dv1rK9e5BQYGfvrpp1988QVIT0+/fPkyjUY7fPhwWFjYynVuRFwo27dvDwkJ+eyzz7744ouvv/76/wOGfW85ISMBTAAAAABJRU5ErkJggg==" alt="" />
以上就是对JavaScript闭包的总结,如果有写得不对的地方,欢迎朋友们指出来,大家一起共同进步!
JavaScript学习总结(十六)——Javascript闭包(Closure)的更多相关文章
-
JavaScript学习总结(十二)——JavaScript编写类
在工作中经常用到JavaScript,今天总结一下JavaScript编写类的几种写法以及这几种写法的优缺点,关于JavaScript编写类的方式,在网上看到很多,而且每个人的写法都不太一样,经常看到 ...
-
JavaScript学习总结(十四)——JavaScript编写类的扩展方法
在JavaScript中可以使用类的prototype属性来扩展类的属性和方法,在实际开发当中,当JavaScript内置的那些类所提供的动态 ...
-
JavaScript学习总结(十八)——JavaScript获取浏览器类型与版本
从网上找到一段使用JavaScript判断浏览器以及浏览器版本的比较好的代码,在此记录一下: 1 <script type="text/javascript"> 2 v ...
-
python3.4学习笔记(十六) windows下面安装easy_install和pip教程
python3.4学习笔记(十六) windows下面安装easy_install和pip教程 easy_install和pip都是用来下载安装Python一个公共资源库PyPI的相关资源包的 首先安 ...
-
201671010140. 2016-2017-2 《Java程序设计》java学习第十六周
java学习第十六周-并发 本周,学习了Java中线程,并发的知识,在老师的带领下,进行了对知识的理解学习,以及对实验的运行讲解,对这一块内容掌握的还可以,在自主编程中,也能够完成.线, ...
-
学习笔记:CentOS7学习之十六:LVM管理和ssm存储管理器使用
目录 学习笔记:CentOS7学习之十六:LVM管理和ssm存储管理器使用 16.1 LVM的工作原理 16.1.1 LVM常用术语 16.1.2 LVM优点 16.2 创建LVM的基本步骤 16.2 ...
-
风炫安全WEB安全学习第二十六节课 XSS常见绕过防御技巧
风炫安全WEB安全学习第二十六节课 XSS常见绕过防御技巧 XSS绕过-过滤-编码 核心思想 后台过滤了特殊字符,比如说
-
风炫安全Web安全学习第十六节课 高权限sql注入getshell
风炫安全Web安全学习第十六节课 高权限sql注入getshell sql高权限getshell 前提条件: 需要知道目标网站绝对路径 目录具有写的权限 需要当前数据库用户开启了secure_file ...
-
JavaScript变量作用域(Variable Scope)和闭包(closure)的基础知识
在这篇文章中,我会试图讲解JavaScript变量的作用域和声明提升,以及许多隐隐藏的陷阱.为了确保我们不会碰到不可预见的问题,我们必须真正理解这些概念. 基本定义 作用范围是个“木桶”,里面装着变量 ...
随机推荐
-
Asp.net MVC4.0(net4.5) 部署到window server 2003上的解决方案
Asp.net MVC4.0(net4.5) 部署到window server 2003上的解决方案 最近做了一个Web项目,也没多想就用了Asp.net MVC4.0 ,MVC4.0默认的目标fra ...
-
C语言之switch
一 switch的语法 switch(表达式){ case 常量表达式1: 代码块1 break; case 常量表达式2: 代码块2 break; case 常量表达式3: 代码块3 break; ...
-
从零开始学 Web 之 移动Web(五)touch事件的缺陷,移动端常用插件
大家好,这里是「 从零开始学 Web 系列教程 」,并在下列地址同步更新...... github:https://github.com/Daotin/Web 微信公众号:Web前端之巅 博客园:ht ...
-
newcoder 筱玛的迷阵探险(搜索 + 01字典树)题解
题目描述 筱玛是个快乐的男孩子. 寒假终于到了,筱玛决定请他的朋友们一起来玩迷阵探险. 迷阵可以看做一个n×nn×n的矩阵A,每个格子上有一个有一个数Ai,j. 入口在左上角的(1,1)处,出口在右下 ...
-
微信小程序开发——小程序分享转发
关于小程序的转发: 最简单的就是点击小程序右上角菜单“转发”按钮直接分享,不过这种分享有点不太友好,实用性也不强. 当然,你可以自定义分享内容,包括标题,简介,图片及分享的小程序页面路径. 再高级一点 ...
-
spring Mvc Web 编码相关 [model 到 视图传递数据] (九)
在某种编码环境,由bean注解的参数可能会发生乱码问题. 即可页面web.xml或其他地方都设备UTF-8, 但还是会有这样的问题. 首先不要使用model传到视图的数据. 第二,不要request. ...
-
input文本框 输入限制三则
其一,只允许输入数字和小数点. <input onKeypress="return (/[\d.]/.test(String.fromCharCode(event.keyCode))) ...
-
.NET 跨平台服务端资料
OWIN Web API: http://www.asp.net/web-api/overview/hosting-aspnet-web-api/use-owin-to-self-host-web- ...
-
【转】彻底理解安卓里的ldpi、mdpi、hdpi、xhdpi、xxhdpi文件夹含义
这个问题我相信困惑了好多人包括很多老鸟,而且有的人以为自己理解其实是错误的,包括之前的我在内,在做安卓适配的时候,一般让美工做720*1280的切图,就直接放到xhdpi下,如果是做了1080*192 ...
-
keil5 mdk调用外部编辑器notepad++、sublime3、VSCode总结
1.打开keil主界面,点击菜单栏Tools菜单,选择如下图所示的选项. 2.点击如下图所示的菜单上红笔标注的地方,给这个工具命名,如notepad++.sublime3.vscode等,如下图, 并 ...