function Person(name, age, job) { this.name = name; this.age = age; this.job = job; this.sayName = sayName; } function sayName() { alert(this.name); } var person1 = new Person("Nicholas", 19, "Teacher"); var person2 = new Person("Greg", 20, "Doctor");
添加回答
举报
0/150
提交
取消
