eval/newFunction不能使用
在Page里的onLoad函数里面试的, var func = new Function("x","y","return x*y"); console.info(func); console.info(func(2,3)); var foo = 'global'; func = function(){var foo = '';eval("foo+=' changed;'");return foo;}; console.info(func()); 运行时提示 [图片]