js中继承的几种用法总结(apply,call,prototype)_javascript技巧【点击查看详情】
js中继承的几种用法总结(apply,call,prototype)_javascript技巧:一,js中对象继承 js中有三种继承方式 1.js原型(prototype)实现继承 代码如下: function Person(name,age){ this.name=name; this.age=age; } Person.prototype.sayHello=function(){ alert(使用原型得