夺命雷公狗jquery---24事件移除unbind
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <script src="js/jquery.js"></script> <script> //页面载入事件ready方法 $(function(){ //版定事件 $('img').bind({ mouseover:function(){ $('#result').html('over'); }, mouseout:function(){ $('#result').html('out'); } }); //事件移除 $('#btndel').bind('click',function(){ //事件移除 $('img').unbind('mouseout'); }); }); </script> </head> <body> <input type="button" id="btndel" value="OUT" /> <hr /> <img src="images/1.jpg" width="100" height="100" /> <hr /> <div id="result"></div> </body> </html>