问题:为什么 p1 的构造函数出来是 Person。不应该是 Man 吗?
function Person()
{
this.type='person'
}
function Man()
{
this.type='Man'
}
Man.prototype=new Person();
var p1=new Man();
console.log('p1\'s constructor is:'+p1.constructor);
console.log('p1 is instance of Man:'+(p1 instanceof Man));
console.log('p1 is instance of Person:'+(p1 instanceof Person));