js实现封装和继承

封装(模拟对象)

http://www.ruanyifeng.com/blog/2010/05/object-oriented_javascript_encapsulation.html

 

继承

http://www.ruanyifeng.com/blog/2010/05/object-oriented_javascript_inheritance.html

用第二种方法继承

posted @ 2017-02-22 14:23  layfork  阅读(301)  评论(0编辑  收藏  举报