日期:2014-05-16 浏览次数:20542 次
function test(){return test;}
test.prototype = {
show : function(f){alert(f)}
}
(new test()).show('d');
function test() {return test;}
Function.prototype.show = function(f) { alert(f); }
var x = new test();
(new test()).show('d');
------解决方案--------------------
function test(){return this;}
test.prototype = {
show : function(f){alert(f)}
}
new test().show('licai1210');
------解决方案--------------------
function test(){}
test.prototype = {
show : function(f){alert(f)}
}
var a = new test();
a.show('d');
这样就好了