function Person(age) { this.age = age; } Person.prototype.sayHi = function (x, y) { console.log((x + y) + ":====>" + this.age); //是实例对象 }; function Student(age) { this.age = age; } var per = new Person(10); //实例对象 var stu = new Student(100);…
原文链接:http://www.cnblogs.com/xljzlw/p/3775162.html var zlw = { name: "zlw", sayHello: function (age) { console.log("hello, i am ", this.name + " " + age " years old"); } }; var xlj = { name: "xlj", }; zlw.s…