/**
 * Created by zzq on 2015/5/15.
 */
    var util = require('util');

    var Person = function(){
        var myD='1';
        this.name = "a",
        this.age = "18",
        this.adress = "地球"
    }

    var Student = function(){
        //获取父类的所有成员
        Person.call(this);
        this.No = "学号";
    }

    util.inherits(Student,Person);

var newStu = new Student();
console.log(newStu.name);

 

相关文章:

  • 2021-08-08
  • 2022-12-23
  • 2021-04-09
  • 2021-05-23
  • 2021-09-02
  • 2021-07-26
  • 2021-09-26
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-23
  • 2021-11-10
  • 2021-08-01
  • 2021-05-10
相关资源
相似解决方案