摘要: js-构造函数&原型的方法 构造函数 定义自己的构造函数 1 function Rectangle(w, h){ 2 this.width = w; 3 this.height = h; 4 } // 然后我们可以通过构造函数创建对象 var rect1 = new Rectangle(20, 60 阅读全文
posted @ 2018-12-06 13:01 nannanxiaogege 阅读(910) 评论(0) 推荐(0) 编辑