摘要: //index.html文件 Document //event.js文件 class Event{ constructor(){ this.handlers = {}//记录所有的事件和处理函数 } /** * 添加事件监听 *@param type ... 阅读全文
posted @ 2019-05-16 15:22 cher。 阅读(370) 评论(0) 推荐(0) 编辑
摘要: 1 /** 2 * 继承大体分为俩种: 3 * 构造函数继承 4 * 原型继承 5 * - 拷贝继承 6 * -深拷贝 7 * -浅拷贝 8 * - 原型链继承 9 **/ 10 11 function Person(name,age){ 12 this.name = name; 13 this.age = age 14... 阅读全文
posted @ 2019-05-16 15:20 cher。 阅读(113) 评论(0) 推荐(0) 编辑