addEventListener function parameter passing binding and unbinding

<a class="btn">go</a>
<a class="remove">remove</a>
var BTN = document.getElementsByClassName ( 'BTN') [0 ], 
    Remove = document.getElementsByClassName ( 'Remove') [0 ];
 var some = function (MSG) { 
    the console.log (MSG) 
}; 
// the bind method pc terminal compatibility problem, note 
var Fn = some.bind ( null , 'ha' ); 
btn.addEventListener ( 'the Click', Fn, to false ); 
remove.addEventListener ( 'the Click', function () { 
    btn.removeEventListener ( 'the Click', Fn, to false ); 
}, to false );

Author: frozen tofu
link: https: //www.zhihu.com/question/50885333/answer/123148092
Source: know almost
copyrighted by the author. Commercial reprint please contact the author authorized, non-commercial reprint please indicate the source.

Guess you like

Origin www.cnblogs.com/jingouli/p/11387957.html