2
我应该如何初始化Function constructor
功能:JS中的函数构造函数初始化?
(两者似乎工作。)
这样的:
var t= new Function ("a","alert(a)");
t(3)//3
alert(Object.prototype.toString.apply(t)); //[object Function]
或
var t= Function ("a","alert(a)"); //without new
t(3) //3
alert(Object.prototype.toString.apply(t));//[object Function]
有什么区别?
谢谢你,对不起我自己找不到它(尽管如此) – 2013-03-18 14:38:20