2013年7月26日
摘要: 我们都知道,在JavaScript中只能模拟实现OO中的"类",也就意味着,在JavaScript中没有类的继承。我们也只能通过在原对象里添加或改写属性来模拟实现。先定义一个父类,1 //父类2 function ParentClass() {3 this.className = "ParentClass";4 this.auth = "Auth";5 this.version = "V1.0";6 this.parentClassInfo = function ... 阅读全文
posted @ 2013-07-26 18:56 牦牛 阅读(1007) 评论(0) 推荐(0) 编辑