摘要:
原型继承是让父对象作为子对象的原型,从而达到继承的目的: 同时,ECMAScript5也提供了类似的一个方法叫做Object.create用于继承对象: 阅读全文
摘要:
// 这里是全局中的 this 是指向 window 的 console.log(this); var a = 10; // 可以直接使用 window.a 输出的结果为10 console.log(this.a); function box1() { // this... 阅读全文