阅读背景:

为什么重新分配Object.prototype不起作用?

来源:互联网 

Why this is not working?

为什么这不起作用?

// this one works as I expected, when objSayHello()
Object.prototype.objSayHello = function(){alert('Hello,from OBJECT prototype')};
// NOT working !
Object.prototype ={objSayHello: function(){alert('Hello,from OBJECT prototype')}};

objSayHello();
// this 



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: