如果重写了JavaScript中的原型方法,则可以调用基础方法吗?MyClass = function(name){ this.name = name; this.do = function() { //do somthing }};MyClass.prototype.do = function() { if (this.name === 'something') { //do something new } else { //CALL BASE METHOD }};
添加回答
举报
0/150
提交
取消