读书人

请教js的superproto是什么意思

发布时间: 2012-09-15 19:09:28 作者: rapoo

请问js的superproto是什么意思?
var inherit = (function(){
function F() {}
return function (child, parent) {
F.prototype = parent.prototype;
child.prototype = new F;
child.prototype.constructor = child;
child.superproto = parent.prototype;
return child;
};
})();

其中child.superproto = parent.prototype;中的superproto 是啥意思啊?

[解决办法]
child的自定义的属性
指向他parent 的prototype

读书人网 >JavaScript

热点推荐