class Person{ constructor(name, age){ this.name = name this.age = age } running(){ } eating(){ } } class Student extends Person{ } var stu = new Student('zs', 18) stu.eating() stu.running()
← JavaScript中的BOM操作 JavaScript函数this指向→