function f(){};
f.prototype.toString=function(){
alert(this)
};
var p=new f();
p.toString();
这个会报错 Uncaught RangeError: Maximum call stack size exceeded at f.toString (%E5%BC%B9%E5%87%BAthis.html:11) at f.toString (%E5%BC%B9%E5%87%BAthis.html:11) at f.toString (%E5%BC%B9%E5%87%BAthis.html:11) at f.toString (%E5%BC%B9%E5%87%BAthis.html:11) at f.toString (%E5%BC%B9%E5%87%BAthis.html:11) at f.toString (%E5%BC%B9%E5%87%BAthis.html:11) at f.toString (%E5%BC%B9%E5%87%BAthis.html:11) at f.toString (%E5%BC%B9%E5%87%BAthis.html:11) at f.toString (%E5%BC%B9%E5%87%BAthis.html:11) at f.toString (%E5%BC%B9%E5%87%BAthis.html:11)
把tostring改下名就可以运行了,这是为什么
qq_小盛开_0
海角风桥
相关分类