摘要: //声明一个类,与普通的类的声明不一样, function Girl() { //将类的事件声明成一个私有的属性,里面是一个对象 this._events = {} } /* { "失恋":["哭","吃","购物"] } */ Girl.prototype.on = function (eventName,callback) { if (this._... 阅读全文
posted @ 2018-06-08 17:20 雷神约 阅读(137) 评论(0) 推荐(0) 编辑