js prototype的使用
来源:互联网 发布:自学java好的课程 编辑:程序博客网 时间:2024/04/24 12:49
<script type="text/javaScript">
function person(name,age,sex){
this.name=name;
this.age=age;
this.sex=sex;
}
var _persons=new person("张三",20,"男"); //person prototype动态添加属性
person.prototype.tall=null;
_persons.tall=180;
function person(name,age,sex){
this.name=name;
this.age=age;
this.sex=sex;
}
var _persons=new person("张三",20,"男"); //person prototype动态添加属性
person.prototype.tall=null;
_persons.tall=180;
document.write(_persons.name+"--"+_persons.age+"---"+_persons.sex+"--"+_persons.tall);
</script>
0 0
- JS prototype的使用
- js prototype的使用
- 使用prototype.js的事件处理方法
- JS中 prototype 关键字的使用
- js优化-prototype原型的使用
- prototype.js使用详解
- js prototype使用要点
- [转]prototype.js开发笔记(针对Ajax的JS框架Prototype的使用介绍)
- prototype.js开发笔记(针对Ajax的JS框架Prototype的使用介绍)
- [转]prototype.js开发笔记(针对Ajax的JS框架Prototype的使用介绍)
- prototype.js的扩展
- js的prototype 例子
- js的prototype详解
- js的prototype
- js prototype的解释
- js的prototype
- 关于JS的prototype
- 关于js的prototype
- LINUX开启允许对外访问的网络端口命令
- iOS摄像头和相册-UIImagePickerController-浅析
- Java编程思想重点笔记(Java开发必看)
- 计算机操作系统笔记(1)--操作系统引论
- css浮动中避免包含元素高度为0的解决方法
- js prototype的使用
- SecureCRT学习笔记
- 类似于qq的侧边栏
- 大话设计模式---UML图关系表示法
- 在ASP.NET MVC5中如何使用Apache log4net 类库来记录日志
- Codeforces 349B Color the Fence【贪心+思维】
- iOS中TableView小技巧
- h264 -> GOP ->frame ->slice -> Nalu
- 设计模式-单例模式