久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      jquery怎么取消on()綁定的事件

      取消方法:1、利用off()函數(shù),該函數(shù)可移除通過on()添加的事件處理程序,語法“綁定了事件的元素.off()”;2、利用unbind()函數(shù),該函數(shù)可刪除任意jq方法添加的事件處理程序,語法“綁定了事件的元素.unbind();”。

      jquery怎么取消on()綁定的事件

      本教程操作環(huán)境:windows7系統(tǒng)、jquery1.10.2版本、Dell G3電腦。

      jquery取消on()綁定的事件

      方法1:使用off() 函數(shù)

      off() 函數(shù)通常用于移除通過 on() 方法添加的事件處理程序。

      <!DOCTYPE html> <html> 	<head> 		<meta charset="utf-8" /> 		<script src="js/jquery-1.10.2.min.js"></script> 		<script> 			$(document).ready(function() { 				$("p").on("click", function() { 					$(this).slideToggle(); 				}); 				$("button").click(function() { 					$("p").off(); 				}); 			}); 		</script> 	</head> 	<body>  		<p>這是一個段落。</p> 		<p>這是另一個段落。</p> 		<p>點擊任何段落可以令其消失。包括本段落。</p>  		<button>移除on()添加的事件</button>  	</body> </html>

      jquery怎么取消on()綁定的事件

      2、使用unbind() 函數(shù)

      unbind() 函數(shù)移除被選元素的事件處理程序。

      ubind() 適用于任何通過 jQuery 附加的事件處理程序。

      <!DOCTYPE html> <html> 	<head> 		<meta charset="utf-8" /> 		<script src="js/jquery-1.10.2.min.js"></script> 		<script> 			$(document).ready(function() { 				$("p").on("click", function() { 					$(this).slideToggle(); 				}); 				$("button").click(function() { 					$("p").unbind(); 				}); 			}); 		</script> 	</head> 	<body>  		<p>這是一個段落。</p> 		<p>這是另一個段落。</p> 		<p>點擊任何段落可以令其消失。包括本段落。</p>  		<button>移除 on()添加的事件</button>  	</body> </html>

      jquery怎么取消on()綁定的事件

      【推薦學(xué)習(xí):jQuery視頻教程、web前端視頻】

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號