继承的方式主要时通过Node.js中的util模块inherits API来实现继承(util.inherits(constructor,superConstructor)); 将一个构造函数的原型方法继承到另一个构造函数中。 直接上例子: 在任何一个目录下新建如下四个文件: person.js: student.js: student_static.js: main.js: 保存代码,运行node main.js 出现如下结果: