使用频率 | 低 |
所属模块 | Std.func |
成员类型 | 静态成员函数 |
Std.func.exec方法用于通过Std.func创建一个函数,并且立即执行.
该方法仅用于让代码风格更加语义化,也加上括号执行并无区别,例如:
Std.func(function(){
}).exec();
//与
Std.func(function(){
})();
相比,两者并无区别.
Std.func.exec(Function call);
Std.func.exec(Function call,Object option);
类型 | 描述 |
Function | 需要执行的函数 |
Object | 参数选项,可以省略,参考 Std.func |
Std.func(function(){
alert("hello");
}).exec();