您的位置: 首页 > IT文章 > javascript 将字符串当函数执行 javascript 将字符串当函数执行 分类: IT文章 • 2023-11-05 16:53:20 //语法 eval(str); //demo var t = "func"; eval(''+func+'()');