摘要:
var util=require('util'); function base(){ ...............}base.prototype.showName=function(){ ...........}function sub(){ ............}util.inherits(sub,base);//实现对象sub继承base对象,但是只继承base.prototype.showName();var objbase= new base();//实例化话对象basevar objsub=new sub();//实例化对象sub 阅读全文