All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
在Jboss4.0下对MySql数据源的设置方法_php资料_编程技术
ASP.NET,2.0功能扩展-跨页提交_[Asp.Net教程]
实例详细讲解PHP连接调用数据库的方法_php资料_编程技术
三个SQL视图查出所有SQL Server数据库字典_[SQL Server教程]
C#教程:建立动态链接库
创建自定义代码片段 提高CSS布局开发效率_[Html教程]
通过Web,Services上传和下载文件_[Asp.Net教程]
教你轻松掌握SQL Server的数据同步技术_[SQL Server教程]
《SQL,Server,2005技术内幕:T-SQl查询》:常见sql问题归类解答_mssql学习_编程技术
VS,2008和.NET,3.5,Beta2新特性介绍_[Asp.Net教程]
Reading number is top 10 pictures
Sora aoi after swimming
Rendez-vous Sleep with actress, three days to earn 600000
More attractive than sora aoi3
mythology hero1
2012 national geographic daily picture6
Embarrassing things comic collection1
A man's favorite things15
寒流来了
007 James. bond's new lover
全身蕾丝丝质美臀
Download software ranking
Boxer vs Yellow4
天龙八部最新服务端
Photoshop 8.0图象编辑软件
Unix video tutorial17
都市狐狸姑娘传
JSP+Ajax Web development typical examples
C#COM编程指南
Tram sex maniac 2 (H) rar bag11
Call Of Duty2
Professional killers2 for Android
delv published in(发表于) 2013/12/31 6:57:27 Edit(编辑)
(javascript)prototype的一个优势也是缺点_JavaScript技术_编程技术

(javascript)prototype的一个优势也是缺点_JavaScript技术_编程技术

(javascript)prototype的一个优势也是缺点_JavaScript技术_编程技术-你的首页-uuhomepage.com

如何在javascript实现OO编程?恐怕最好的方式就是充分利用prototype属性。关于prototype的介绍有很多,我就不赘述了。比较基本的原理是,当你用prototype编写一个类后,当你new一个新的object,浏览器会自动把prototype中的内容替你附加在object上。这样,通过利用prototype,你也就实现了类似OOjavascript


javascript中,object就是一个associative array。一个function就是一个类。当你编写如下function时,其实就是定义了一个类,该function就是它的构造函数。



function MyObject(name, size)


{


this.name = name;


this.size = size;


}





添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.