摘要: 标题写的有点难理解问题是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 阅读全文
posted @ 2011-09-10 19:27 顺武 阅读(736) 评论(0) 推荐(0) 编辑