原型链
时间:2020-11-19 09:22:56
收藏:0
阅读:39
function Person(name,age){
this.name=name;
this.age=age;
}
Person.prototype={
constructor:Person,
show(){
console.log("我是show方法");
}
}
var p1=new Person("lili",18);
var p2=new Person("Tom",20);
原文:https://www.cnblogs.com/Blog-521/p/14003328.html
评论(0)