繼承關(guān)系
代碼:
function Temp(){};
Temp.prototype=Person.prototype;
var stuProto=new Temp;
Student.prototype=stuProto;
stuProto.constructor=Student;
function Temp(){};
Temp.prototype=Person.prototype;
var stuProto=new Temp;
Student.prototype=stuProto;
stuProto.constructor=Student;