-
张3
发布于 2025-08-05
-
收藏
*/2.2 原型链除了能修改prototype指向的对象, 还能修改prototype指向哪一个对象, 即为prototype赋予一个不同的对象. 这可以实现一种简单的继承:function Superman() {}Superman.prototype.sayHello = function(){alert("I'm a superman.");}function SupermanCan(skill){this.skill = skill;}// ...