87,994
社区成员




/**
* Created by Evan on 14-8-4.
* 本次实验用于测试“构造函数的原型对象改变后,构造出来的对象是否还指向这个最初的构造函数”
*/
function Person(){
this.name="Jack";
}
Person.prototype.sayName=function(){
return this.name;
}
function Student(){
this.job="student";
}
Student.prototype=new Person();
Student.prototype.sayJob=function(){
return this.job;
};
var stu=new Student();