摘要:
1、构造函数模式function Person(name,age,job){ this.name = name; this.age = age; this.job = job; this.sayName = function(){ alert(this.name); };}var person1 = new Person("Nicholas",29,"Software Engineer");var person2 = new Person("Greg",27,"Doctor");person1.sayName(); 阅读全文
posted @ 2011-10-07 10:44 Minakata 阅读(1334) 评论(1) 推荐(1) 编辑