This topic created in 4817 days ago, the information mentioned may be changed or developed.
function aa(){
...
}(aa);
这是个什么写法?
5 replies • 1970-01-01 08:00:00 +08:00
 |
|
JS里的自调用函数(Self-Invoking Function),意思就是函数创建出来之后就被立即调用.
很多油猴脚本里会有这样的写法,主要用于初始化.
|
 |
|
(function aa(){ ... })(aa); 才能执行
你那个不符合语法规范的
|
 |
|
明显是匿名函数。。。通常用来做闭包。。
|
 |
|
` (function(aa){ //xxxxx })(aa) `
|