例如:
var elements = ["FunctionA","FunctionB","FunctionC"];
$.each(elements, function(i, e) {
var elements[i] = new Function("a", "b", "return a * b");
});
$(function(){
var a = FunctionA(1,1);
var b = FunctionB(1,1);
var c = FunctionC(1,1);
console.log(a);
console.log(b);
console.log(c);
});
请问这有可能做到吗?
先谢谢大大回答。