摘要: 1.基本概念2.闭包,call,apply2.1.闭包:以下是官方解释,A "closure" is an expression (typically a function) that can have free variables together with an environment that binds those variables (that "closes" the expression). 在js中,根据链式作用域的特点,子对象可以访问父对象,父对象则不能访问子对象。这种在函数内部嵌套定义子函数就形成了闭包。闭包会使得函数的变量都保存在内 阅读全文
posted @ 2010-12-12 16:33 cnbwang 阅读(256) 评论(2) 推荐(0) 编辑