JavaScript继承机制研究  被引量:2

Research on JavaScript Inheritance Mechanism

在线阅读下载全文

作  者:周岚[1] ZHOU Lan(Xuzhou Finance and Economics Branch,Jiangsu Union Technical Institute,Xuzhou 221008,China)

机构地区:[1]江苏联合职业技术学院徐州财经分院

出  处:《软件工程》2019年第12期14-17,共4页Software Engineering

摘  要:JavaScript是面向Web的编程语言,其高端、动态以及面向对象的编程风格,使得它已经从一门简单的脚本语言进化成为一门强大的编程语言。JS的核心是支持面向对象的,同时它也提供了强大灵活的面向对象语言的编程能力。本文针对JavaScript继承机制的实现方式进行了总结归纳,深入介绍了基于原型的继承、构造函数方式继承、组合继承、寄生式继承等继承机制,并分析了各自方式的优缺点,便于读者更深层次的理解JavaScript面向对象编程机制。Javascript is a web-oriented programming language.Its high-end,dynamic and object-oriented programming style has evolved from a simple scripting language to a powerful programming language.The core of JS is to support objectoriented,and it also provides powerful and flexible programming ability of object-oriented language.This paper summarizes the implementation of JavaScript inheritance mechanism,introduces the inheritance mechanism based on prototype,constr uctor,combination and parasitism,and analyzes the advantages and disadvantages of each method,which is convenient for readers to understand the JavaScript object-oriented programming mechanism.

关 键 词:原型链 继承 原型对象 构造函数 

分 类 号:TP311[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象