摘要:
标题写的有点难理解问题是function Obj (){ this.id = 123; this.ele = document.getElementById('big_map_a'); this.attachEvents();}Obj.prototype = { attachEvents: function(){ this.ele.onclick = this.handleClick; }, handleClick: function(){ // }}在上面的代码中 handleClick内部的this变量将被指向 onclick的元素 big_map_a 元素, 无法再使用t 阅读全文