var A=new A();
function A(){}//构造函数
A.prototype={
funcA:function(){alert("What the fuck!");}
funcB:function(){
//我现在想再这里调用funcA的函数,具体该怎么做,求教!
}
}
var A=new A();
function A(){}//构造函数
A.prototype={
funcA:function(){alert("What the fuck!");}
funcB:function(){
//我现在想再这里调用funcA的函数,具体该怎么做,求教!
}
}
this.funcA();
好吧,加个this就可以了。谁来回复下,给个最佳答案。
var a = new A();
a.funcA = function(){alert("the new funcA")};
a.funcB(); //this.funcA() 调用的不再是A.prototype.funcA, 而是a.funcA