javascript Function 对象的定义
创建函数的语法:var myFunction=new Function(arg1,arg2,...agrN,body);agrN 为函数的参数,body为函数执行
//自定义函数,判断函数是否存在,不存在则创建新 函数
if (typeof window.$sliderProcess == 'undefined') {
window.$sliderProcess = new Function('obj1', 'obj2', 'alert(obj1+obj2);');
}
window.$sliderProcess('1', '2');
返回 ‘12’。