摘要: 1-1 构造函数入门Object和Array是原生构造函数,在运行时会自动出现在执行环境中。同时,也可以创建自定义的构造函数,从而定义自定义对象类型的属性和方法。例:function Person(name, age, job){ this.name = name; this.age = age; this.job = job; this.sayName = function(){ alert(this.name); }}var person1 = new Person("han",22,"designer");var person2 = new ... 阅读全文
posted @ 2012-06-16 23:49 zzu-han 阅读(212) 评论(0) 推荐(0) 编辑