![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
javascript
文章平均质量分 83
fhnp1983
这个作者很懒,什么都没留下…
展开
-
js面向对象-动态原型方法
最近在读javascript高级程序设计,其中的对象基础一章感觉讲的很好,下面把其中有用的东西分享一下。看如下js构造类的一个示例:Js代码 function Car(sColor, iDoors, iMpg) { this.color = sColor;转载 2011-11-21 14:38:28 · 5157 阅读 · 1 评论 -
js 4种方式实现继承.
Insert title here<!--//冒充对象/*function Parent(username){ this.username=username; this.sayHello=function() { alert(this.username); }}function Child(username,password){ this.method=Parent;原创 2011-11-22 16:05:38 · 517 阅读 · 1 评论