标签:
这是对《高级3》的P156页,原型的动态性的理解
function Person(){ } var oldproto = Person.prototype; var friend = new Person(); Person.prototype = { constructor: Person, name: "Nicholas", age: 29, job: "Software Engineer", sayName: function () { alert(this.name); } }; console.log(oldproto); console.log(Person.prototype);
标签:
原文地址:http://www.cnblogs.com/masita/p/5088005.html