1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <title>Document</title> 6 <script type="text/javascript" src="../jquery-1.12.4.min.js"></script> 7 <script type="text/javascript"> 8 $(function(){ 9 // bind的第一个参数可以同时给多个事件,用空格隔开 10 $('#btn').bind('click mouseover mouseout', function(){ 11 alert('click事件'); 12 13 // 解绑事件 14 $(this).unbind('mouseover mouseout'); 15 }) 16 }); 17 </script> 18 </head> 19 <body> 20 <input type="button" name="" value="按钮" id="btn"> 21 </body> 22 </html>