???
jquery unbind() ??? ???
??: unbind() ???? ??? ??? ??? ???? ?????. ? ???? ??? ??? ?? ?? ??? ??? ???? ????? ??? ?? ? ??? ??? ??? ??? ? ????. ubind()? jQuery? ?? ??? ?? ??? ???? ?? ?????.
?? ??? ??? ? ?? ??? ??: ??? ???? ??? ?? ??? ??? ???? ?????. ????? ???? ?? ?? unbind() ???? ??? ??? ?? ?? ??? ???? ?????.
??: ??$(selector).unbind(event, function
????:
???? | Description |
event | ?? ?????. ??? ?? ? ?? ?? ???? ???? ?????. ? ????? ???? ??? ???? ???? ?? ??? ?????. |
??? ????? ???? ????? ??? ??? ?????. ??? ???: ??? ??? ??? ?????(?: ???? ?? ???? ???? ? ??? ??? ??). ?? ??? ???? ??? unbind() ???? ?? ??? ???? ?????. | ??: ?? | $(selector).unbind(eventObj)
????:
????
Description
eventObj
?? ?????. ? eventObj ????? ??? ??? ???? ?????. jquery unbind() ??? ?
<html>
<head>
<script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("p").click(function(){
$(this).slideToggle();
});
$("button").click(function(){
$("p").unbind();
});
});
</script>
</head>
<body>
<p>這是一個(gè)段落。</p>
<p>這是另一個(gè)段落。</p>
<p>點(diǎn)擊任何段落可以令其消失。包括本段落。</p>
<button>刪除 p 元素的事件處理器</button>
</body>
</html>
???? ?? ???? ????? ??? "???? ??" ??? ?????