摘要:
<script>//构造函数//构造函数的缺点就是每个方法都要在每个实例上创建一边function Person(name,age,sex){this.name=name;this.age=age;this.sex=sex;this.sayName=new Function("alert(this.name);");}var p1=new Person("yjc",26,"man");var p2=new Person("yjc1",26,"man");//p1,p2都有一个Func 阅读全文
posted @ 2011-04-11 12:41 yjc2629498 阅读(355) 评论(0) 推荐(0) 编辑