JavaScript自执行闭包 jQuery是一个很明显的自执行闭包的例子。
//无参数的(function(){ alert('hello');})();//有参数的(function(name){ alert('Hello ' + name);})('world');