奇怪的问题:Prototype 中 bind 方法,高分求解!
prototype中给Function.prototype加了一个bind方法,然后我在页面中写了一个最简单的方法:
function test(){}
然后我写了下面这段:
alert(Function.prototype.bind);
alert(test.bind);
在firefox2.0下前一个alert总是显示bind的方法,这个正常,但是下一个alert有时也显示bind方法,有时却是"undefined"。
我这个页面中没有任何代码,因为是在使用过程中发现的这个问题,因此我做了一个最简单的页面进行测试,会出现这样的问题,有没有高手能给解释一下???