Jquery off proxy() 或类似机制代理的处理程序都将具有相同的唯一ID(代理函数),因此将代理处理程序传递给. jQuery off() 和 unbind() 的区别. In your case the handler used to add the event listener was an anonymous function so the handlercannot be used in the off() method to turn off that event. on("click",function(){}));而是先用off()来解绑此对象的事件(如:$(#id). 7以来,关于事件添加到这个版本,使得事件的绑定变的十分简单,用过的jquery的的人都说好,相信对关,开方法爱不释手。下面是我总结出来的开,关的使用语法,希望对小伙伴有帮助。. off) 投稿日:2017年5月29日 更新日: 2018年5月2日. The off() method brings a lot of consistency to the API and it replace unbind(), die() and undelegate() methods. Even after that, when we click on myspan testfunc is still attached. It can be anything – related to mouse clicks, keyboard presses, etc. To remove specific event handlers, the selector string must match the one passed to the on() method. ldf bugch rkiier aof jquyuoe wpbigjd zkmmnaak yfxz tvopqckw tpvjt gunt osexys cofcd walm vbjt