Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 11 years ago.
查看简单 JavaScript 继承 和 JavaScript 中的继承模式。
最简单的方法可能是函数继承,但也有优点和缺点。
Take a look at Simple JavaScript Inheritance and Inheritance Patterns in JavaScript.
The simplest method is probably functional inheritance but there are pros and cons.
Douglas Crockford 对 JavaScript 中的继承有一些非常好的解释:
Douglas Crockford has some very good explanations of inheritance in JavaScript:
extend = function(destination, source) { for (var property in source) { destination[property] = source[property]; } return destination; };
扩展 JavaScript< /a>
您还可以将过滤器添加到 for 循环中。
Extending JavaScript
You could also add filters into the for loop.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
暂无简介
文章 0 评论 0
接受
发布评论
评论(3)
查看简单 JavaScript 继承 和 JavaScript 中的继承模式。
最简单的方法可能是函数继承,但也有优点和缺点。
Take a look at Simple JavaScript Inheritance and Inheritance Patterns in JavaScript.
The simplest method is probably functional inheritance but there are pros and cons.
Douglas Crockford 对 JavaScript 中的继承有一些非常好的解释:
Douglas Crockford has some very good explanations of inheritance in JavaScript:
扩展 JavaScript< /a>
您还可以将过滤器添加到 for 循环中。
Extending JavaScript
You could also add filters into the for loop.