这种方式的好处是函数中定义的变量对外界是不可见的,具有很好的封装性。
模块模式介绍请见:[url]http://liudaoru.iteye.com/blog/147654[/url]
下面的链接是别人的解释:[url]http://home.wangjianshuo.com/cn/20070515_cec.htm[/url]
模块模式介绍请见:[url]http://liudaoru.iteye.com/blog/147654[/url]
下面的链接是别人的解释:[url]http://home.wangjianshuo.com/cn/20070515_cec.htm[/url]
(function() {
var x = "abc";
alert(x);
})();