1.取消绑定事件前需要对事件进行绑定
// 绑定事件
$('button').on('click.abc', fun);
$('button').on('click.index', function(){ console.log('哈哈哈哈'); });
$('button').on('mouseover', function(){ console.log('hello'); });
$('button').on('mouseout',function(){console.log('886');})
function fun(){ console.log('今天真好'); }
取消全部事件:$().off()
// 取消全部事件
$('button').off();
取消对应类型事件 :$().off(对应类型);
// 取消对应类型事件
$('button').off('click');