var a = document.querySelector(".a");
var b = document.querySelector(".b");
function Student() {
this.bbb();
}
function add(Student) {
Student.prototype.bbb = function() {
this.getName();
this.jiao();
console.log(this);
};
Student.prototype.getName = function() {
console.log(this);
hh(a, "click", this, false);
};
Student.prototype.jiao = function() {
alert("汪汪汪");
};
}
function hh(dom, type, fn, capture) {
dom.addEventListener(type, fn, capture);
}
add(Student);
var c = new Student();
我点击dom为什么没有响应
你这是啥啊
从开始到结束你事件都没给绑定上啊