<body>
<script type="text/javascript" src="jquery-1.9.1-min.js" ></script>
<script type="text/javascript">
function bindFun(){
alert("给bind按钮成功绑定了事件");
}
function unbindFun(){
alert("给unbind按钮成功绑定了事件");
//执行这句以后再点击bind按钮将无效
$("#bind").unbind("click",bindFun);
}
$(document).ready(function(){
//分别给bind和unbind按钮绑定事件
$("#bind").bind("click",bindFun);
$("#unbind").bind("click",unbindFun);
});
</script>
<input type="button" value="bind" id="bind" /><br/><br/><br/>
<input type="button" value="unbind" id="unbind" />
</body>