1,在DOM元素中直接绑定; 2.在JavaScript代码中绑定; 3.绑定事件监听函数。
oBtn.addEventListener("绑定事件",绑定后执行的函数语句,事件方法:true为捕获,false为冒泡)
第二种如果重复绑定事件,后面的函数会覆盖前面的函数; 第三种可以重复绑定事件