<! DOCTYPE html>
<meta charset= "UTF-8" >
<title>Title</title>
<body>
<input type= "button" id= "BTN" value= "button" >
<input type= "button" id= "del" value= "Delete event binding" >
<script src= "Jquery-1.11.3.js" ></script>
<script>
/* UNBIND ([type][,data]) */
Without parameters, all binding events are removed.
A parameter of the event type is provided, and only the binding event of that type is deleted.
The handler function passed at the time of binding is the second argument, and only that person-specific event handler is deleted.
/* $ (function () {
$ ("#btn"). Bind ("click", Fun1=function () {
Alert ("1")
}). bind ("click", Fun2=function () {
Alert ("2")
}). bind ("click", Fun3=function () {
Alert ("3")
});
$ ("#del"). Click (function () {
$ ("#btn"). Unbind ("click", Fun2)
})
});*/
One (); The binding event is triggered once and is immediately deleted
$ (function () {
$ ("#btn"). One ("click", Fun1=function () {
Alert ("222")
})
});
</script>
</body>
JQuery Removal Events