javascript 将字符串当函数执行

//语法

eval(str);

//demo

var t = "func";

eval(''+func+'()');

原文地址:https://www.cnblogs.com/yanqin/p/6863526.html